Untitled
unknown
plain_text
10 months ago
399 B
2
Indexable
Never
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")
Leave a Comment