while function is running python 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.