Skip to content

Instantly share code, notes, and snippets.

@sousatg
Created March 27, 2016 13:05
Show Gist options
  • Save sousatg/a869a912abbac7488f9f to your computer and use it in GitHub Desktop.
Save sousatg/a869a912abbac7488f9f to your computer and use it in GitHub Desktop.
Jogo HILO em Python
import random
n = int( random.random() * 100 )
tentativas = 0
while True:
a = raw_input('Numero entre 0 e 100: ')
if int(a) == n:
break
tentativas += 1
print 'Tenta outra vez'
print 'Parabens conseguiste acertar no numero'
print 'Numero de tentativas'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment