I'm a beginner in python and I dont know if this code is good or if it needs improvements
import random
heads = 0
tails = 0
coin = input("Write heads or tails[heads/tails]")
if coin.upper() == "HEADS":
heads = random.randint(1, 2)
print(heads)
if coin.upper() == "TAILS":
tails = random.randint(1, 2)
print(tails)
Aucun commentaire:
Enregistrer un commentaire