Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73635

Re: Newbie coding question

From Emile van Sebille <emile@fenx.com>
Subject Re: Newbie coding question
Date 2014-06-26 13:05 -0700
References <CAHXoDSD4cA6wQdgqGbX31aT6TLt99ePhAhxc5-gd_2FfyQ8HBQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.11268.1403813183.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 6/26/2014 11:53 AM, Martin S wrote:
> Hi,
>
> I've been following the tutorial here
> http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/
> But when I get to section 1.10 there is
>
> person  =  input('Enter your name:')
>
> However this generates an error
>
>
>  >>> person = input('Enter your name: ')
> Enter your name: hi
>
> Traceback (most recent call last):
>    File "<pyshell#0>", line 1, in <module>
>      person = input('Enter your name: ')
>    File "<string>", line 1, in <module>
> NameError: name 'hi' is not defined
>  >>>
>
> I have no idea what I am doing wrong with this - it look correct to me.
>
> I'm obviously doing something stupid, anyone can suggest what?

I'd guess you're running Python2, and need to be running Python3.

Emile


Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Newbie coding question Emile van Sebille <emile@fenx.com> - 2014-06-26 13:05 -0700

csiph-web