Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # numCrunch
- import random
- inp = input("Press ENTER to start (-1 to end)...")
- right = 0
- total = 0
- i = 0
- while( int(i) != -1 ):
- total += 1
- mult = random.randint(11, 31)
- num = random.randint(2, 9)
- print(mult,"*",num)
- i = input("")
- if(int(i) == (mult * num)):
- print('ok.....')
- right += 1
- else:
- print('...............WRONG....... ', mult * num)
- print(mult * num)
- print ('Done, your score := ',right,'/',(total - 1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement