Advertisement
Guest User

nigga

a guest
Nov 24th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. import random
  2.  
  3. for count in range(10):
  4.    
  5.     x = random.randint(1,9)
  6.     y = random.randint(1,9)
  7.     score = 0
  8.     o = ("*","-","+")
  9.     op = random.choice(o)
  10.    
  11.     ans = input(str(x) + str(op) + str(y))
  12.     if ans == eval(str(x) + str(op) + str(y)):
  13.         print("YAY")
  14.     else:
  15.         print("why you no worky?")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement