heads or tails generator code example Example: coinflip import random random.choice('Heads', 'Tails')