Re: [Tutor] Flip a coin

2013-04-09 Thread Dave Angel
On 04/09/2013 07:50 AM, Najam Us Saqib wrote: Hi, This program is killing me, I have been working on it for last 3 hours, I have tried my best but can't make it work, please help me out. The Problem: Create a program that flips a coin 100 times and than tells you the number of tails and head

Re: [Tutor] Flip a coin

2013-04-09 Thread Mitya Sirenef
On 04/09/2013 07:50 AM, Najam Us Saqib wrote: Hi, > > This program is killing me, I have been working on it for last 3 hours, I have tried my best but can't make it work, please help me out. > > The Problem: > > Create a program that flips a coin 100 times and than tells you the number of tai

Re: [Tutor] Flip a coin

2013-04-09 Thread Steven D'Aprano
On 09/04/13 21:50, Najam Us Saqib wrote: Hi, This program is killing me, I have been working on it for last 3 hours, I have tried my best but can't make it work, please help me out. Would you like to tell us what it is doing wrong, or should we guess? My guess is below: flip_coin = 100

Re: [Tutor] Flip a coin

2013-04-09 Thread Sayan Chatterjee
flip_coin = 100 and then after a while while flip_coin != 100: It is contradicting.So the while loop is never executed. Just put flip_coin = 0 and remove head = "" tail = "" They are not necessary. It should work. Cheers, Sayan On 9 April 2013 17:20, Najam Us Saqib wrote: > Hi, > > This p

[Tutor] Flip a coin

2013-04-09 Thread Najam Us Saqib
Hi, This program is killing me, I have been working on it for last 3 hours, I have tried my best but can't make it work, please help me out.  The Problem: Create a program that flips a coin 100 times and than tells you the number of tails and heads. My code: # Flip a coin import random fli