I need to know the score of "heads" and "tails" in 5 times tossing the coin. For example, the result should be: - Heads was 3 times - Tails was 2 times
import random
print("Heads or tails. Let's toss a coin five times.\n")
toss = 1
while toss <= 5:
coin = ["HEADS", "TAILS"]
y = random.choice(coin)
print("Toss number:", toss, "is showing:", y)
toss = toss + 1
tosswhich count tosses, why not make 2 more, one counts heads and one counts tailsifstatements).