Lesson 21: (Combined with Bronze) Random numbers
Post date: Mar 29, 2018 3:00:21 PM
import random, time
def wait():
for x in range(0,9):
print("...")
time.sleep(1 - x * 0.1)
v = input("Head or Tail?:")
print("You guessed", v, "!")
r = random.randint(0,100)
coin = ""
if r < 50:
coin = "Tail"
else:
coin = "Head"
wait()
if v == coin:
print("It is", coin ,"You won!!!")
else:
print("It is", coin ,"You lost...")
for x in range(0, 100):
print(random.randint(1,6))