> I have no programming experience and am trying to  teaching myself python.
> Am trying to replicate the code below but I get the error message below
> highlighted in yellow:


We need a little more information.  Where does this code come from?
What text book or instructional material are you using?


I ask because the code you're doing is unusual looking, and appears to
be out-of-context.  To be more specific, the following part of your
program:

        return input ("1")

doesn't make too much sense in isolation.

The errors you're seeing are due to the fish-out-of-waterness of the
code: the "return" statement only makes sense if you're writing a
function definition, but if you're just getting started, you probably
haven't learned about how to write function definitions yet.

If you can point us to the instructional material you're looking at,
we might give better suggestions as to what's missing.

But alternatively, have you tried the following tutorial instead?

    http://en.wikibooks.org/wiki/Non-Programmer's_Tutorial_for_Python_3

It may be a gentler introduction to the language than what you're
looking at now.


Good luck!  If you have more questions, please feel free to ask.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to