File tree Expand file tree Collapse file tree 4 files changed +47
-0
lines changed
Expand file tree Collapse file tree 4 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ print ("Welcome!" )
2+ g = input ("Guess the number: " )
3+ guess = int (g )
4+ if guess == 5 :
5+ print ("You win!" )
6+ else :
7+ print ("You lose!" )
8+ print ("Game Over!" )
Original file line number Diff line number Diff line change 1+ print ("Welcome!" )
2+ g = input ("Guess the number: " )
3+ guess = int (g )
4+ if guess == 5 :
5+ print ("Você venceu!" )
6+ else :
7+ if guess > 5 :
8+ print ("Passou do Ponto!" )
9+ else :
10+ print ("Quase lá!" )
11+ print ("Game Over!" )
Original file line number Diff line number Diff line change 1+ print ("Welcome!" )
2+ guess = 0
3+ while guess != 5 :
4+ g = input ("Guess the number: " )
5+ guess = int (g )
6+ if guess == 5 :
7+ print ("You win!" )
8+ else :
9+ if guess > 5 :
10+ print ("Too high!" )
11+ else :
12+ print ("Too low!" )
13+ print ("Game over!" )
Original file line number Diff line number Diff line change 1+ from random import randint
2+ secret = randint (1 ,10 )
3+ print ("Welcome!" )
4+ guess = 0
5+ while guess != secret :
6+ g = input ("Guess the number: " )
7+ guess = int (g )
8+ if guess == secret :
9+ print ("You win!" )
10+ else :
11+ if guess > secret :
12+ print ("Too high!" )
13+ else :
14+ print ("Too low!" )
15+ print ("Game over!" )
You can’t perform that action at this time.
0 commit comments