I'm trying to code a quiz game, which every time you get a correct answer adds 1 point; at the end of the game the program prints out the number of points. The thing is, I'm trying to code it by using a function.
def qea(x, y, z):
if x == y:
print("Correct!")
z += 1
else:
print('Wrong!')
points = 0
question1 = input("Who is the president of USA?: ").upper()
answer1 = "JOE BIDEN"
qea(question1, answer1, points)
question1 = input("Alexander...: ").upper()
answer1 = "THE GREAT"
qea(question1, answer1, points)
print(points)
Why is the program output always 0?