The Fix Didn't Work
Fixing one mistake doesn't make a program right. Python stops at the first error, so another mistake further on shows only once the first is gone. Or the error goes away, and the result is still wrong. Either way, the conversation isn't over.
Go on in the same chat. The AI still has your program, the error and what it suggested, so you only add what's new: the program as it is now, attached again, what it prints now, and what you changed. If the result is wrong, say what you expected, and why: the AI doesn't know how Mia charges, and without that, it may decide that your sum is what's wrong. A new chat starts from nothing, and “It still doesn't work” leaves the AI to guess what happened in your editor.
Mia's program works out what this week's walks cost. She charges each walk on its own: 6 for every started half hour of that walk. The program ends with an error. Once it runs, don't take its result on trust, even if the answer said what it would print: check the total by hand.
Instructions
- 1
Run the program: it ends with an error. Attach
script.pyand what it printed, and ask what's wrong. Then send it. - 2
Make the change the answer gives for the line in the error, and run the program. There's no error now, and it prints
Total: 36. Check it by hand: walks of 45, 20, 45 and 50 minutes cost 12 + 6 + 12 + 12 = 42. In the same chat, attachscript.pyagain, and say what you changed, what it prints now, and what you expected and why. Then send it. - 3
Change the program as the answer says, keep the list of walks as it is, and run it. It prints
Walks: 4andTotal: 42.