[Tutor] egg timer

boB Stepp robertvstepp at gmail.com
Sun Jun 24 18:51:03 EDT 2018


Greetings, Paula!

On Sun, Jun 24, 2018 at 4:52 PM Paula Malimba <pmalimba at gmail.com> wrote:
>
> Hello,
>
> I'm new to programming and am studying the book Begin to Code with Python.
> I'm stuck in lesson 3, trying to make an egg timer. I keep having a syntax
> error.
>
> Please help!!!

Please pretend for a moment that you received your own email above.
Read it carefully.  If you were trying to help this person, "Paula",
how would you answer the following questions?

1)  Hmm.  She is having a syntax error.  This could be one of a large
number of possible syntax errors, each having a different cause.
Which syntax error might she be having?

2)  She is doing lesson 3 from the book "Begin to Code with Python".
I don't own that particular book.  I wonder what that lesson is about
and what specific problem(s) she is trying to solve?

3)  How is she running her program?  Is she running it directly from
the Python terminal?  From a ".py" file?

4)  I wonder what version of Python she is running?  Python 2.X or
3.X?  This might make a difference in how I answer her.

5)  And what operating system is she using?  This could be a factor, too.

Paula, I am *not* trying to be condescending!  But your email as sent
is so vague I (and everyone else) has no idea how to help you.  As an
example of the kind of information we need, I artificially generated a
syntax error of my own.  If I were asking for help I would probably
say something like the following:

Hi folks!  I am working on an egg timer challenge from the book "Begin
to Code with Python".  In lesson 3 it asks me to query the user to
enter how many minutes he/she wants his/her egg boiled.  I wrote the
following code in my Python interpreter:

py3: time = input("Please tell me how many minutes you want your egg to boil?)

, but I got the following error:

File "<stdin>", line 1
    time = input("Please tell me how many minutes you want your egg to boil?)
                                                                            ^
SyntaxError: EOL while scanning string literal

I am using Python 3.6.5 on Windows 7-64 bit.  I was trying to get the
amount of time in minutes the user wanted me to boil the egg in my
"time" variable, but I got the above error.  What am I doing wrong?

Do you think you might be able to answer my question?

Hope this helps us to help you, and we really do want to help!

Cheers!




-- 
boB


More information about the Tutor mailing list