Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
2

How to add a point system in python.

PhoenixGameDev
PhoenixGameDev

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?

1 year ago

Voters

Comments

TopNew
2
Spacecraft
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.

1 year ago
1
PhoenixGameDev
PhoenixGameDev

@Spacecraft
Thank you a ton!

1 year ago