Chad Everett wrote:
> Hi Everyone,
>
> I am new to Python and programming in general. I bought the book
"Python
> Programming for the Absolute Beginner" by michael Dawson.
>
> I have been working through it but am having trouble.
> I am trying to make a coin flip program and keep geting a Synax Er
Chad,
try "elif tries == 2" or just "else:". You are not allowed to put an
expression after an else statement.
I recommend you read the python tutorial at
http://docs.python.org/tut/tut.html .
Peace
Bill Mill
bill.mill at gmail.com
On Fri, 4 Feb 2005 12:49:51 -0600, Chad Everett <[EMAIL PROTEC
Le Fri, 4 Feb 2005 12:49:51 -0600, Chad Everett a écrit :
> Hi Everyone,
>
> I am new to Python and programming in general. I bought the book "Python
> Programming for the Absolute Beginner" by michael Dawson.
>
> I am trying to make a coin flip program and keep geting a Synax Error
> "invalid s
Chad Everett wrote:
> Hi Everyone,
>
> I am new to Python and programming in general. I bought the book
"Python
> Programming for the Absolute Beginner" by michael Dawson.
>
> I have been working through it but am having trouble.
> I am trying to make a coin flip program and keep geting a Synax E
Chad,
The usage is like this:
- if :
-
- elif :
-
- else:
-
So, your code should be:
if tries == 1:
elif tries == 2:
(You have 'else' followed by a condition...hence a syntax error. else
is what it means - "if no other condition is satisfied". You should use
'elif' for s