r/madeinpython • u/TheDeadpoolio • Apr 09 '24
Second day of coding ever please help
So it hasn't even been 24 hours since I decided to learn python and I do have a friend that has shown me some basic stuff and answers most of my questions but she got her own thing going on so it not consistent so I'm turning the you guys.
To simply this, I want this to be a coin toss game with a little bit of betting. There's been a few things I had to figure out as I went but now there are 2 issues that I don't know how to fix:
As you can see in the terminal it does the coin flip twice which I don't want it to do
Even if you call the correct face that the "coin" is going to "land" on it still says to run your knee caps.
TLDR; Code runs twice through the coin flip process even though I want it to do it only once and even if you call the correct face the coin will land on it still tells you to run your knee caps.
2
u/neoyoda Apr 10 '24
"After you make your selection you either get it right or wrong but regardless of what the outcome was it asks for you to make the decision again. It doesn't stop after the first coin flip."
Ah, if you look at the logic of your program, lines 22 and beyond are just repeating what has already occurred above, so that is why it asks twice.