In <1737402a-2f4d-440a-abd7-6cc500f67...@googlegroups.com> Dylan Riley
writes:
> heads = int("1")
Why are you taking the int value of a string constant? If you know you
want the value 1, why not just use it directly?
> flips = 100
> headscount = 0
> tailscount = 0
>
On 11/21/2015 06:44 PM, Larry Hudson wrote:
On 11/20/2015 07:30 PM, Dylan Riley wrote:
i am learning python and was tasked with making a program that flips a coin 100
times and then
tells you
the number of heads and tails.
[snip]
import random
heads = int("1")
tails = int("2")
flips = 100
On суббота, 21 ноября 2015 г. 6:30:02 MSK, Dylan Riley wrote:
Also some more notes:
heads = int("1")
tails = int("2")
Why use this strange initialization? The usual way:
heads = 1
tails = 2
gives the same result.
while flips != 0:
flips -= 1
There's no need to use while and flips
On суббота, 21 ноября 2015 г. 6:30:02 MSK, Dylan Riley wrote:
i am learning python and was tasked with making a program that
flips a coin 100 times and then tells you
the number of heads and tails.
First, you have a syntax error:
if result = heads:
should be:
if result == heads:
Second,
On 11/20/2015 07:30 PM, Dylan Riley wrote:
i am learning python and was tasked with making a program that flips a coin 100
times and then tells you
the number of heads and tails.
I have done so coming up with this piece of work but it doesnt run can anyone
help me out?
#This is credited to
i am learning python and was tasked with making a program that flips a coin 100
times and then tells you
the number of heads and tails.
I have done so coming up with this piece of work but it doesnt run can anyone
help me out?
#This is credited to dylan
print(" \\ \\ \\ \\ \\ \\ \\ \\ D FLIPS
On Sat, Nov 21, 2015 at 2:30 PM, Dylan Riley wrote:
> I have done so coming up with this piece of work but it doesnt run can anyone
> help me out?
>
Please, please, try to help us out here! What does it mean to "not
run"? Does it run and give an exception? Does it run
On Fri, Nov 20, 2015 at 10:30 PM, Dylan Riley
wrote:
> i am learning python and was tasked with making a program that flips a
> coin 100 times and then tells you
> the number of heads and tails.
>
> I have done so coming up with this piece of work but it doesnt run can
>