Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 10 lines (9 sloc) 0.28 kb
f16b361 @asweigart Initial commit.
authored
1 import random
2 number1 = random.randint(1, 10)
3 number2 = random.randint(1, 10)
4 print('What is ' + str(number1) + ' + ' + str(number2) + '?')
5 answer = input('> ')
6 if answer == number1 + number2:
7 print('Correct!')
8 else:
9 print('Nope! The answer is ' + str(number1 + number2))
Something went wrong with that request. Please try again.