my program keeps returning a score of 0 everytime I run it even with the corrcect answer. Also how would I go about subtractiong points for a wrong answer.
P.S, This is my first time coding anything.
score = 0
print('Math Quiz')
def check_answer(question, answer):
global score
if question == answer:
print("Correct answer!")
score = score + 1
else:
print('Sorry, wrong answer.')
question_1 = input('What is 2 times 2?\n')
check_answer(question_1, 4)
question_2 = input('What is 1 minus 1?\n')
check_answer(question_2, 0)
question_3 = input('What is 4 divided by 2?\n')
check_answer(question_3, 2)
question_4 = input('What is 3 to the third power?\n')
check_answer(question_4, 9)
question_5 = input('What is 3 times 5?\n')
check_answer(question_5, 15)
print(score)