python-by-example-150-chall.../challenges52-59/challenge-059.py

11 lines
337 B
Python
Raw Normal View History

2019-07-18 17:44:06 +08:00
import random
color = ['red', 'blue', 'green', 'orange', 'black']
select_color = random.choice(color)
ask = 0
while select_color != ask:
2019-07-18 17:47:42 +08:00
ask = str(input('Choose colour to guess computer colour! : ')).lower()
2019-07-18 17:44:06 +08:00
if select_color != ask:
print('You are probably feeling {0} right now'.format(select_color))
print('Well done')