Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- numb1 = random.randint(1,10)
- numb2 = random.randint(1,10)
- print('What is: ', numb1, ' + ', numb2, '?')
- answer = input('Answer: ')
- while (numb1 + numb2 != answer):
- print('Incorrect, try again!')
- answer = input('Answer: ')
- print('Correct!')
- >>> 1 == "1"
- False
- while numb1 + numb2 != int(answer):
- answer = int(input('Answer: '))
Add Comment
Please, Sign In to add comment