Untitled
unknown
python
a year ago
321 B
12
Indexable
# Online Python - IDE, Editor, Compiler, Interpreter
import random
coin = random.randint(0,1)
print(coin)
if coin == 0:
coinface = "heads"
else:
coinface = "tails"
guess = str(input("Guess heads or tails?"))
if guess == coinface:
print("Correct!")
else:
print("Sorry, it is " + coinface +".")Editor is loading...
Leave a Comment