Number guess

def guessNumber(guess): x =1 while x < 5: num = int(input("as;dlfkasjd")) if num > guess: print ("Too high") x += 1 elif num < guess: print ("too low") x +=1 elif num == guess: print("you got it in", x, "tries") break elif x == 5: print("donezo") return guessNumber(3)
Simple number guess game script

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.