Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
2

Error makes no sense

alirazzes
alirazzes

This is what came up in the code when there is nothing wrong with the code and everything is defined.

Traceback (most recent call last):
File "main.py", line 4, in
name = input("Hello, Traveller! I'm Alderon. What is your name?")
File "", line 1, in
NameError: name 'James' is not defined

4 years ago

Voters

Comments

TopNew
1
JustARatherRidi
JustARatherRidi

The code you have written seems to be for Python 3, but you've put it in a Python 2 repl.

So, all you need to do is copy the code and paste it into a Python 3 repl, and you should be good to go!

Once you've done that, your repl should look like this one: https://repl.it/@JustARatherRidi/ISUAliRpy

4 years ago
1
Imanoob_coder
Imanoob_coder

the input should be raw_input("Hello, Traveller! I'm Alderon. What is your name?")
if its in python 2.7. otherwise idk

4 years ago
1
SamuelPKuld
SamuelPKuld

What programming language are you using?

4 years ago
Load more