Find file
Fetching contributors…
Cannot retrieve contributors at this time
9 lines (9 sloc) 279 Bytes
import random
number1 = random.randint(1, 10)
number2 = random.randint(1, 10)
print('What is ' + str(number1) + ' + ' + str(number2) + '?')
answer = input('> ')
if answer == number1 + number2:
print('Correct!')
else:
print('Nope! The answer is ' + str(number1 + number2))