Untitled
unknown
plain_text
2 years ago
399 B
7
Indexable
import random
choice = int(input("which one, heads or tails? "))
0 = "heads"
1 = "tails"
land = random.randint(0,1)
print("The coin landed on" ,land)
if choice.lower() == "heads":
if land % 2 == 0:
print("Player wins!")
else:
print("Computer wins!")
else:
if land % 2 == 1:
print("player wins!")
else:
print("computer wins")Editor is loading...
Leave a Comment