diff options
Diffstat (limited to 'data/math/guess')
-rw-r--r-- | data/math/guess | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/data/math/guess b/data/math/guess index 68c0760..14c6539 100644 --- a/data/math/guess +++ b/data/math/guess @@ -1,18 +1,19 @@ import random import pippy -R = random.randrange(1,100) +R = random.randrange(1, 100) -print "Guess a number between 1 and 100!" -N = input("Enter a number: ") -i=1 -while (N!=R): - if N>R: +print 'Guess a number between 1 and 100!' +N = input('Enter a number: ') +i = 1 +while (N != R): + if N > R: pippy.console.red() - print "Too big... try again" + print 'Too big... try again' else: pippy.console.blue() - print "Too small.. try again" + print 'Too small.. try again' pippy.console.black() - N = input("Enter a number: ") - i=i+1 -print "You got it in", i, "tries" + N = input('Enter a number: ') + i = i + 1 + +print 'You got it in', i, 'tries' |