Hey, I just started learning Python yesterday and I got to the end of a chapter on Branching and While Loops...which lead me to a "challenge"...basically it gives me the description of a program and I have to write it. This program flips a coin 100 times and then gives the number of tails and heads. Heres what I have so far:
import random coin = random.randrange(2) + 1 amount = 100 heads = 1 tails = 2 while amount > 0: heads += 1 tails += 2 raw_input("\n\nEnter Exits")
I want amount to go down by one each time its flipped and then it would stop at 0. I still need to add a raw_input like "Hit enter to start flipping the coin"...but I'm waiting till I get this part done first.
Thanks for any input.