If you want more of my pastes visit: https://randompaste.000webhostapp.com/index.html -------------------------------------------------------------------------------------- view my last post at: https://bitbin.it/leQ48C2W/ -------------------------------------------------------------------------------------- import random #You need to import the random module before you can use it def takeinput() : z = input() while z < 9 or z > 100 : z = input() return z def guess() : #Function definitions need a colon after them x = random.choice(range(1, 101)) ##The second argument to range() is the max + 1 y = takeinput() while(y!=x) : #Indentation is needed for while print "Guess a number!" if y == x :#If's need colons after them print "You've won the game!" elif y > x : print "Try a bit lower." elif y < x : print "Go higher." y = takeinput() print "Welcome to the Stupid Useless Guess Game�! Would you like to try guessing your pick a number? Use 1 to guess or 2 to pick." option = input() if option == 1 : guess() #x and y have to already exist if you are going to use them as arguments elif option == 2 : #COOOOOOOOODE