Created
March 27, 2016 13:05
-
-
Save sousatg/a869a912abbac7488f9f to your computer and use it in GitHub Desktop.
Jogo HILO em Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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