[Tutor] Input checking [letters or numbers]

Panagiotis Atmatzidis p.atmatzidis at gmail.com
Fri Dec 23 20:29:45 CET 2005


Yeah works you're right. :-)

On 12/23/05, bob <bgailer at alum.rpi.edu> wrote:
> At 11:16 AM 12/23/2005, Panagiotis Atmatzidis wrote:
> >Hello there,
> >
> >Thank you for the prompt response.
> >
> >On 12/23/05, bob <bgailer at alum.rpi.edu> wrote:
> >[snip]
> > > print input("x ; ")
> > > and enter "Hello world"
> >
> > >>> x = input("x: ")
> >x: hello world
> >Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> >   File "<string>", line 1
> >     hello world
> >              ^
> >SyntaxError: unexpected EOF while parsing
> >
> >Just did.. and as you can see I get an error. I know because I read so
> >in the tutorial I mentioned before.. I mean that it says so.. now I am
> >taking the first steps into programming, hence I don't really know if
> >there's another reason for input to break upon chars.
>
> Enter "hello world" including the quotes.
> input expects a Python expression.
> hello world is not a Python expression
> "hello world" is
> [snip]
>
>


--
Panagiotis


More information about the Tutor mailing list