rony2605

Laço com numero aleatorio

Mar 14th, 2013
98
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from random import randint
  2. secret = randint(1,10)
  3. print("Bem vindo")
  4. guess = 0
  5. while guess != secret:
  6.     g = input("Digite o numero: ")
  7.     guess = int(g)
  8.     if guess == secret:
  9.         print("Vc venceu")
  10.     else:
  11.         if guess > 5:
  12.             print("Numero eh menor: ")
  13.         else:
  14.             print("Numero eh maior. ")
  15.                    
  16. print("game over")
RAW Paste Data