Hello, I am currently in the starting stages of learning python through codeacademy. I am working on the chance game which I was able to make work fine.
While this game does work fine I do have some questions.
I notice when I return new_total and just return in my function my game still works the same. What is the difference when I return new_total or just simply use return.
As you can see for my else statement I added a little extra saying if the bet was more than the money you cannot bet more money than what you have, this code also works just fine. However I tried to add code that tells the user they did not enter a valid guess.
elif guess != “Heads” or “Tails”:
print(“This is not a valid guess! Please guess Heads or Tails”)
Note I had this code at the very bottom of my function right before the last else:
This code seems to break my program, All of my outputs are claiming invalid guesses even when a guess is not invalid, can you tell me what I am doing wrong? Thank you for the help!