This is my current code it prints two random numbers between 1 and 20 and asks the user to add them together. I want it to say correct when the answer has been answered correctly, but I am not to sure how to do this.
The program runs fine it will work but when the user enters the correct answer nothing happens.
from random import randint
def Add(x, y):
return x + y
num1 = randint(1,20)
num2 = randint(1,20)
print(num1, "+", num2)
answer = input("What is the answer to the question: ")
if ("answer") is (num1 + num2):
print("Correct")