from random import randint num1 = randint(1, 10) num2 = randint(1, 10) question = "What is " + str(num1) + " times " + str(num2) + "? " answer = int(input(question))