blob: 14c653939a5502ad81cceecd9629fa990be863ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import random
import pippy
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:
pippy.console.red()
print 'Too big... try again'
else:
pippy.console.blue()
print 'Too small.. try again'
pippy.console.black()
N = input('Enter a number: ')
i = i + 1
print 'You got it in', i, 'tries'
|