On Thursday 18 May 2006 16:19, Chris Delgado wrote:
> import random
>
> heads = 0
> tails = 0
> flips = 0
>
> if flips <= 100:
>
> coin = random.randrange(2)
>
> if coin = 0:
> heads +=
> elif coin = 1:
> tails +=
>
> flips +=1
>
> print "The coin was flipped 100 times and it was heads" + heads + "times
> and tails" + tails + "times!"
>
> raw_input("\n\nPress the Enter key to exit")
I think you want '==' and not '='. Look up assignment and equal!
John
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor