I am starting out with python and tried to make a heads or tails game with little understanding so i could get used to it. I am trying find out a way to output one value (heads) if the other has already been used (tails).
Here is part of my code, i need help with P2:
P1 = str(input("P1, please enter Heads or Tails "))
if P1 in ['Heads','heads','HEADS']:
print("You are Heads")
elif P1 in ['Tails','TAILS','tails']:
print("You are Tails")
else:
print("Oops, Thats not right")
exit()
time.sleep(1)
P2 = str(input("P2, please enter heads or tails"))
time.sleep(1)
print("The coin has been flipped")
time.sleep(1)
HoT = random.randint(1,2)
if HoT == 1:
print ("heads wins")
else:
print("tails wins")
time.sleep(1)
exit()