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

Explained at Your Level

An explanation helps only if you can follow it. The AI doesn't know what you've learned, so it explains for anyone, in the words a programmer would use. Tell it what you know, and it can build on that.

The program in the editor uses enumerate(), which you haven't met yet. You'll find things you haven't learned in code from an AI, and in code from anywhere else, all the time, and that's what asking is for. Asked only Explain this program., one answer said, correctly:

enumerate(walks, start=1) pairs each item in the list with a counter. The counter starts at 1 (because of start=1), not the default 0.
On each pass, the counter is assigned to number and the item (the minutes) is assigned to minutes. Python unpacks the pair into those two variables.

That's right, and it's written for someone who already knows what a pair is and what unpacking means. The same message gets a different answer each time, but the others were much like this one. A message that gets an explanation you can follow says:

  • what you want: the program explained line by line;
  • what you know: variables, lists, if, for loops and functions;
  • what's new to you: here, enumerate().

Instructions

  1. 1

    Attach script.py and add to the message what you know and what you don't: you know variables, lists, if, for loops and functions, and you haven't learned enumerate(). Ask for the program to be explained line by line, with what you know. Then send it.

Back

2/7

  1. 1. It Sees Only What You Send
  2. 2. Explained at Your Level
  3. 3. Quiz: Numbered Walks
  4. 4. Ask About One Thing
  5. 5. Without That
  6. 6. Quiz: What It Knows About Your Program
  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: