Newbie help with simple script written for v3.3 and used on vs2.7, please? - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Newbie help with simple script written for v3.3 and used on vs2.7, please? (/thread-1156.html) |
Newbie help with simple script written for v3.3 and used on vs2.7, please? - PaulMorrey - Dec-08-2016 Hi I m a complete newbie to any sort of programming so sorry if this is a stupid question - working my way through the python for absolute beginers on you tube and I m on Video2. Have got python running from cmd and using notepad++ for editor. Code reads print("hello world") myName = input("what is your name?") print(myName)above runs fine outputting Video shows typing your name after the ? (no space) pressing enter key and then name should print however I get an error message basically saying Name error Name Paul is not defined. I think video uses v3.3 and I m on 2.7 don t know if that makes a difference but any help welcome. Thanks for reading. Thanks Paul RE: Newbie help with simple script please - DennisT - Dec-08-2016 Works fine under 3.5.1 RE: Newbie help with simple script please - PaulMorrey - Dec-08-2016 Thanks for the response I was wondering if the reason was I`m using 2.7 and Video is 3.3. I may install V3 and see if that works. Thanks again Just a quick update installed V3.3 and code now runs fine. Thanks everybody for reading - I`m sure I will have more questions soon. On that note anybody know any good online tutorials/videos etc? or know a good book for complete novice? Looked at Python programming for the absolute beginner by Mike Dawson on Amazon for around £16 has anyone used this book? Cheers Paul RE: Newbie help with simple script please - sparkz_alot - Dec-08-2016 instead of "input()" you should use "raw_input()" myName = raw_input("what is your name?")and instead of "print()", you can just use "print var " print myNamethere were some other changes from v2 to v3, but these two are probably used most often As to resources, check this link Python Resources RE: Newbie help with simple script please - Kebap - Dec-09-2016 (Dec-08-2016, 07:46 PM)PaulMorrey Wrote: Thanks everybody for reading - I`m sure I will have more questions soon. Well then welcome to programming and our forums, Paul. You can take a look at our (long) list here in the Tutorials sub-forum: A List of Free Python Resources |