Tables Challenge 6

Add a score variable and increase score by 1 when the sum is correct
Above all the other code we are going to create a variable called score and put a 0 (zero) into it.
score=0
In the if else part of the code underneath the print("correct") increase the score by one.
Make sure this line of code starts at the same distance from the right margin as the print("correct") line.
score=score+1
Now include this score variable in a print command to tell the user what score they have got.
Include it at the end of the code. Make sure it is not indented so the user gets the score report
whether they have got the sum correct or not.
print("Your score so far is",score,"out of 10")
Save your work and run the program lots of times to test it.
Is the score increased when you get the sum correct?
Comments