Guest User

Untitled

a guest
Mar 13th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import random
  2. numb1 = random.randint(1,10)
  3. numb2 = random.randint(1,10)
  4.  
  5. print('What is: ', numb1, ' + ', numb2, '?')
  6. answer = input('Answer: ')
  7.  
  8. while (numb1 + numb2 != answer):
  9. print('Incorrect, try again!')
  10. answer = input('Answer: ')
  11. print('Correct!')
  12.  
  13. >>> 1 == "1"
  14. False
  15.  
  16. while numb1 + numb2 != int(answer):
  17.  
  18. answer = int(input('Answer: '))
Add Comment
Please, Sign In to add comment