0

Name is not defined

Hi, I'm new to python and am very eager to learn. So below is my simple code : a=input("my name is") print (a) For some reason this doesn't work. It says in the last line "name 'Carl' is not defined" In using python 2.7.12 Any help would be great Thanks

25th Oct 2016, 4:56 PM
Safwaan Saquib
Safwaan Saquib - avatar
2 odpowiedzi
+ 1
I believe python 2.7 uses raw_input() for strings!
26th Oct 2016, 12:09 PM
Alex Schrichte
Alex Schrichte - avatar
0
try putting your name inside double quotes " "
25th Oct 2016, 6:21 PM
Digbose Hazarika
Digbose Hazarika - avatar