Ask coding questions

← Back to all posts
How to add a point system in python.
PhnixGames

How do I make a point system so it adds points at each correct answer, and then I can put the total amount of points at the end?

Answered by Spacecraft [earned 5 cycles]
View Answer
Voters
PhnixGames
Comments
hotnewtop
Spacecraft

Somewhere near the top of your code, add this variable: points = 0
Then, everywhere you have an IF statement confirming a correct answer, add this line:
points += 1
or
points += 2
or
points += 4
or however many points you want to add to the current points total. At the end, you can print(points) to see your total. Also, you can subtract points in the same manner: points -= 2.

PhnixGames

@Spacecraft Thank you a ton!