'''
Sample transcript...

Guess, heads or tails: __heads__
It was tails. You lose.

Guess, heads or tails: __heads__
It was heads. You win!
'''

import random

# pick a random coin
# let's think of 0 as 'heads' and 1 as 'tails'
#value = random.randint(0, 1)
#if value == 0: value = 'heads'
#else: value = 'tails'
value = random.choice(['heads', 'tails'])

# get their guess
guess = input('Guess, heads or tails: ')

if guess == value:
  print(f'It was {value}. You win!')
else:
  print(f'It was {value}. You lose.')
