python check while condition at end of loop code example
Example: how to make the score add on while its in a loop in python
To avoid the values of score being reset to 0 on every iteration of the loop you should initialize both variables above the while loop.