Hi i'm using python to write a simple math quiz for my college class using if else statements but my code will only put out the (else) print even when the (if) conditions are met.
Code Below
import random
num1 = random.randint(1,20)
num2 = random.randint(1,20)
print(num1,'+',num2)
user_answer = input("Your answer here: ")
real_answer = num1+num2
print(real_answer, user_answer)
if user_answer == real_answer:
print("Yes")
else:
print("no")