Advertisement
Guest User

Mini-jogo-python.py

a guest
Jul 16th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. from random import randint
  2. import os
  3. n = int(randint(1, 100))
  4. c = 0
  5. p = 0
  6. t = 0
  7. while p != n:
  8.     p  = int(input('Seu palpite de 1 à 100: '))
  9.     t += 1
  10.     if p == n:
  11.         print('ACERTOU!  Placar: %i ' % t)
  12.     elif p < n:
  13.         print('Chute um valor MAIOR')
  14.     else:
  15.         print('Chute um valor MENOR')
  16.     if t % 5 == 0 :
  17.         os.system('clear')
  18.     else:
  19.         print('PENSE BEM!')
  20. print('Fim de jogo!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement