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

Let It Quiz You

You've read a program, or had it explained, and it made sense. Whether you really understand it shows when you work something out with it yourself: what does the function return for other walks? An AI can ask you questions like that, as many as you want.

The function first_long_walk() in the editor returns the number of the first walk that's longer than a limit: for the walks in the program and a limit of 50 minutes, it returns 3. It has a return inside the loop, on purpose this time, and a return 0 after the loop.

A quiz works best as a conversation: one question, your answer, then the next question. Asked only Quiz me on this program., the assistant listed five questions or more at once, in every answer we got. So ask for one question at a time, and for the answer only after you've tried. Ask about other walks and limits than the program's own: what it prints for its own, you've already seen.

You can check your answer without anyone's help: add a line that prints the function's result for the question's walks and limit, and run the program. When you've checked, tell the AI what you worked out and ask for the next question, for as long as you like.

Instructions

  1. 1

    Attach script.py and ask the AI to quiz you on it: one question at a time, each asking what first_long_walk() returns for other walks and another limit than the program's own, and no answer before you've tried. Then send it.

  2. 2

    Work out the answer yourself. Then check it: at the end of the program, add a line that prints what first_long_walk() returns for the walks and the limit in the question, and run the program.

Back

5/7

  1. 1. Hints First
  2. 2. Explain It, Don't Fix It
  3. 3. Quiz: The Same Mistake
  4. 4. Feedback, Not a Rewrite
  5. 5. Let It Quiz You
  6. 6. Quiz: Who Writes It?
  7. 7. Summary
Next

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with: