[Tutor] beginner here

2011-12-07 Thread Do youknow who
Im trying to write this program where i make it flip a coin 100 times then tells me the number of heads and tails it came up with.   this is what I got but it does not run   # Coin Flip # Demonstrating the While loop import random print(I will flip a coin 100 times and tell you) print(, how many

Re: [Tutor] beginner here

2011-12-07 Thread Max S.
You are using an 'elif' for your 'coin_rolls == 1:'. The 'elif' keyword means that if the last 'if' statement (and any 'elif's behind it) was *not* true, only then will it be executed. Your code could be written as 'if rolls is NOT less than or equal to 100, only then check to see if it is 1 or

Re: [Tutor] beginner here

2011-12-07 Thread Dave Angel
On 12/07/2011 08:39 PM, Max S. wrote: You are using an 'elif' for your 'coin_rolls == 1:'. The 'elif' keyword means that if the last 'if' statement (and any 'elif's behind it) was *not* true, only then will it be executed. Your code could be written as 'if rolls is NOT less than or equal to

Re: [Tutor] beginner here

2011-12-07 Thread शंतनू
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08-Dec-2011, at 6:47 AM, Do youknow who wrote: Im trying to write this program where i make it flip a coin 100 times then tells me the number of heads and tails it came up with. this is what I got but it does not run # Coin Flip #