Re: [Tutor] Issue w/ program: Flip a coin and count heads and tails

2013-06-16 Thread Bhanu Pratap Singh
Hi Rafeal, You have called random function two times. It must be called single time and check if it produced 1 or 2. See my code. /* code ---*/ import random print( This program flips a coin 10 times. It then counts the number of heads and tails. )

[Tutor] Issue w/ program: Flip a coin and count heads and tails

2013-05-24 Thread Rafael Knuth
Hello, I am writing a program in Python 3.3.0 which flips a coin 10 x times and then counts the number of heads and tails. It obviously does something else than I intended, and I am wondering what I did wrong: import random print ( This program flips a coin 10 times. It then counts the number

Re: [Tutor] Issue w/ program: Flip a coin and count heads and tails

2013-05-24 Thread Bod Soutar
On 24 May 2013 12:01, Rafael Knuth rafael.kn...@gmail.com wrote: Hello, I am writing a program in Python 3.3.0 which flips a coin 10 x times and then counts the number of heads and tails. It obviously does something else than I intended, and I am wondering what I did wrong: import random

Re: [Tutor] Issue w/ program: Flip a coin and count heads and tails

2013-05-24 Thread Asokan Pichai
On Fri, May 24, 2013 at 4:31 PM, Rafael Knuth rafael.kn...@gmail.comwrote: Hello, I am writing a program in Python 3.3.0 which flips a coin 10 x times and then counts the number of heads and tails. It obviously does something else than I intended, and I am wondering what I did wrong: What

Re: [Tutor] Issue w/ program: Flip a coin and count heads and tails

2013-05-24 Thread Rafael Knuth
I am writing a program in Python 3.3.0 which flips a coin 10 x times and then counts the number of heads and tails. It obviously does something else than I intended, and I am wondering what I did wrong: What is that you intended? Please explain that. I want that program to flip a coin 10 x

Re: [Tutor] Issue w/ program: Flip a coin and count heads and tails

2013-05-24 Thread Omar Abou Mrad
On Fri, May 24, 2013 at 2:08 PM, Asokan Pichai paso...@talentsprint.comwrote: snip Is this an actual output??? Did the program stop here at 5 heads and 7 tails? snip Asokan Pichai Adding fuel to fire. He actually got 12 Tails and 8 Heads! ___

Re: [Tutor] Issue w/ program: Flip a coin and count heads and tails

2013-05-24 Thread Wolfgang Maier
On 24 May 2013 12:01, Rafael Knuth rafael.knuth at gmail.com wrote: Hello, I am writing a program in Python 3.3.0 which flips a coin 10 x times and then counts the number of heads and tails. It obviously does something else than I intended, and I am wondering what I did wrong: import random

Re: [Tutor] Issue w/ program: Flip a coin and count heads and tails

2013-05-24 Thread Asokan Pichai
On Fri, May 24, 2013 at 4:54 PM, Rafael Knuth rafael.kn...@gmail.comwrote: I am writing a program in Python 3.3.0 which flips a coin 10 x times and then counts the number of heads and tails. It obviously does something else than I intended, and I am wondering what I did wrong: What is that