Information about cookies on this page

Our website uses cookies to ensure the functionality of the website, to collect and analyze information about the performance and usage of the website. Privacy Policy

  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in
  
  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in

Quiz: The Function or the Test?

You asked an AI for a function week_total() and for tests of it. You run them, and one test prints False. What do you do?

Back

4/7

  1. 1. An Example That Runs
  2. 2. Tests First, Then the Code
  3. 3. Check the Tests Too
  4. 4. Quiz: The Function or the Test?
  5. 5. Tests with assert
  6. 6. Quiz: Which Line Is Wrong?
  7. 7. Summary
Next

Try it yourself

Do this exercise right here in your browser. No account needed.