On 10/1/2010 6:52 AM, delegb...@dudupay.com wrote:
This is also a learner's advice, so just give it a shot.
In the first function, set HEADS to 0 and TAILS to 0.
Then if flip==0, heads=heads+1
Return Heads.
Do same for Tails and see if it makes any sense.
Regards.
Isn't Python case sensitive?
"Colleen Glaeser" wrote
First, write a function that simulates flipping a coin. This
function needs
no parameters. When called, it should return either “HEADS” or
“TAILS”.
Those are strings. That’s *return*, not print.
OK, You've done this
When that function is working, write another
wrote
This is also a learner's advice, so just give it a shot.
In the first function, set HEADS to 0 and TAILS to 0.
In general thats good advice but Colleen was explicitly told
to return HEADS and TAILS as strings.
But using strings doesn't add much complexity overall
in this case.
Al
From: Colleen Glaeser
Sender: tutor-bounces+delegbede=dudupay@python.org
Date: Fri, 1 Oct 2010 02:49:33
To:
Subject: [Tutor] Coin Toss Problems
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.pytho
On Fri, Oct 01, 2010 at 02:49:33 -0500, Colleen Glaeser wrote:
>
>
> First, write a function that simulates flipping a coin. This function needs
> no parameters. When called, it should return either “HEADS” or “TAILS”.
> Those
> are strings. That’s *return*, not print.
Looks good, though I
Dear Tutors,
I have an assignment for class due in about 6 hours and I've been working on
it for about 3 hours already, getting nowhere.
My assignment is as follows:
In this exercise, you will write several functions and use them in different
ways. Follow the specifications; I insist.
First,