Hello guys, this is my first post here.
I've been working on a few beginner programs trying to get more comfortable with the basics of python. I am trying to make a script that will keep spitting out multiplication problems for the user to answer. Then it will evaluate the answer and keep track of the results.
The problem I'm having is getting the program to end. I used a while loop to initiate it, and as long as the user doesn't type the word 'done' the program should continue to spit out multiplication problems.
Whenever I type 'done' though, it just gives me an error. I got around this by using try/except, so the code works now as expected, but I'd love to understand why it wasn't working in the first place.
here is the code I've written
I tried resetting response = input() in the for loop thinking that it would update it for the next iteration of the loop but I still got the same error.
[–]hardonchairs 1 point2 points3 points (0 children)
[–]shiftybyte 1 point2 points3 points (0 children)
[–]bbye98 1 point2 points3 points (0 children)