python-by-example-150-chall.../challenges52-59/challenge-054.py
2019-07-18 12:44:06 +03:00

10 lines
231 B
Python

import random
choose = random.choice(['h', 't'])
ask = str(input('Choose heads or tails against computer! h|t : '))
if choose == ask:
print('You win')
else:
print('Bad luck')
print('computer choose is {0}'.format(choose))