I am trying to make a Ping Pong game using Python and make a scoring system to keep track of how many points each "paddle" or player will score. This is the code I have so far:
score = 0
def point_for_paddle1():
score = score + 1
turtle.write(score)
When I run the code it says that the score is not defined. I believe this problem is being caused by the score = score + 1 line.
How should I fix that? I'm fairly new to python but all types of answers are appreciated. Thanks in advance! P.s I'm using Python 3.