The question has been answered but I have to wait 7 minutes to mark it.
I'm trying to make a coin flip program in Python, using the random library. When the program is run, I input the names for headsplr, tailsplr and mode, but after entering the mode the program immediately crashes. I suspect it is something to do with the slashes in the input message.
I tried using a built-in library called 'pdb', which debugs the program, but it gave me this <string>(1)<module>()
, which I have no idea what it means.
import random
headsplr = input("Type the player using Heads.\n")
tailsplr = input("Type the player using Tails.\n")
mode = input("Enter the mode you want to play. Modes: classic <-(50/50) or unbalanced <-(51/49)\n")
if str(mode) == "classic":
equalchance = random.randint(0,1) # 0 is Heads and 1 is Tails
if equalchance == "0":
print("Heads won!")
elif equalchance == "1":
print("Tails won!")