I'm a newbie and I'm stumped...

Emile van Sebille emile at fenx.com
Sat Aug 1 12:30:08 EDT 2015


On 7/30/2015 6:22 PM, Dwight GoldWinde wrote:
> I am running Python 3.4 on my Mac mini, OS X 10.10.2, using Coderunner 2 as
> my editor.
>
> Here¹s the code:
> #!/usr/bin/env python3
> word = (input('Enter a word Œ))
>
> When running this inside of Coderunner, I get the follow error, after
> entering the word Œserendipity¹:
>
> Enter a word serendipity
> Traceback (most recent call last):
>    File "test short.py", line 2, in <module>
>      word = (input('Enter a word '))
>    File "<string>", line 1, in <module>
> NameError: name 'serendipity' is not defined

I'd look at which python is actually running (sys.version):

Python 3.4.0 (default, Apr 11 2014, 13:05:11)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
 >>> word = (input('enter a word '))
enter a word test
 >>>
emile at emile-OptiPlex-9010:~$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> word = (input('enter a word '))
enter a word test
Traceback (most recent call last):


Emile
   File "<stdin>", line 1, in <module>
   File "<string>", line 1, in <module>
NameError: name 'test' is not defined
 >>>






More information about the Python-list mailing list