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

It Sees Only What You Send

Welcome to Programming with AI. You can already write programs in Python. In this course, you'll write them with an AI assistant beside you, as most programmers now do: you'll have code explained, say what code you need, find mistakes, and learn from the answers instead of only copying them. Above all, you'll check what the assistant gives you, because its code can be wrong and still sound sure.

Most exercises have a program in the code editor, with the Run button and the console, and a chat with a real AI. A second AI reads each answer and checks it against the instruction, so you see at once whether your message worked. The instructions about the program are checked when you run it, as in the Python course.

The first thing to know about an assistant is that it sees only what you send it: not the code editor, not the console, not this lesson. It's the same in a chat app, where the AI doesn't know what's open on your computer until you paste it or attach it. Ask about your program without it, and a good assistant asks you for it. A worse one answers anyway, about a program it has imagined.

In this course, you'll help Mia, who walks dogs after school. The program in the editor goes through this week's walks, each a number of minutes in a list, and finds the longest. The message in the chat box asks what it prints, but the AI has never seen the program. To send it, click Attach to message over the program: script.py then goes with your next message, as it is at that moment.

Instructions

  1. 1

    Click Attach to message over the program, so that script.py goes with the message in the chat box. Then send the message. The answer should say what the program prints.

  2. 2

    Don't take the answer's word for it: click Run and compare the console with what the AI said. Then add a walk of 75 minutes at the end of the list and run the program again. It prints Walks: 5 and Longest: 75.

1/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: