input() function in Visual Studio Code? /u/West_Culture1257 Python Education

So, I am brand new to coding, I’m talking day one. I’ve looked up answers to my questions in many google searches and tutorials but it feels like in order to understand the answer I need to have already known 10 other things related to it. Was wondering if someone here could explain it a bit more plainly haha. I’m having a hard time understanding the input() function, and how to use it in Visual Studio Code. I installed Code Runner and toggled on ‘Run code in Terminal’, and followed a tutorial to the letter and am still getting this error message in the terminal as shown in the code block after the “>>>”.

I don’t understand why it’s saying ‘name’ isn’t defined when to me that’s what it looked like I did because of the = sign. Could someone please help me figure out what’s going wrong before I pull my hair out? Explain it assuming I know literally nothing else about Python or VSC except for how to create a new file and use the print() function. Thanks a million.

name = input("Enter your name: ") print("Your name is: ", name) >>> print("Your name is: ", name) Traceback (most recent call last): File "<python-input-15>", line 1, in <module> print("Your name is: ", name) ^^^^ NameError: name 'name' is not defined >>> 

submitted by /u/West_Culture1257
[link] [comments]

​r/learnpython So, I am brand new to coding, I’m talking day one. I’ve looked up answers to my questions in many google searches and tutorials but it feels like in order to understand the answer I need to have already known 10 other things related to it. Was wondering if someone here could explain it a bit more plainly haha. I’m having a hard time understanding the input() function, and how to use it in Visual Studio Code. I installed Code Runner and toggled on ‘Run code in Terminal’, and followed a tutorial to the letter and am still getting this error message in the terminal as shown in the code block after the “>>>”. I don’t understand why it’s saying ‘name’ isn’t defined when to me that’s what it looked like I did because of the = sign. Could someone please help me figure out what’s going wrong before I pull my hair out? Explain it assuming I know literally nothing else about Python or VSC except for how to create a new file and use the print() function. Thanks a million. name = input(“Enter your name: “) print(“Your name is: “, name) >>> print(“Your name is: “, name) Traceback (most recent call last): File “<python-input-15>”, line 1, in <module> print(“Your name is: “, name) ^^^^ NameError: name ‘name’ is not defined >>> submitted by /u/West_Culture1257 [link] [comments] 

So, I am brand new to coding, I’m talking day one. I’ve looked up answers to my questions in many google searches and tutorials but it feels like in order to understand the answer I need to have already known 10 other things related to it. Was wondering if someone here could explain it a bit more plainly haha. I’m having a hard time understanding the input() function, and how to use it in Visual Studio Code. I installed Code Runner and toggled on ‘Run code in Terminal’, and followed a tutorial to the letter and am still getting this error message in the terminal as shown in the code block after the “>>>”.

I don’t understand why it’s saying ‘name’ isn’t defined when to me that’s what it looked like I did because of the = sign. Could someone please help me figure out what’s going wrong before I pull my hair out? Explain it assuming I know literally nothing else about Python or VSC except for how to create a new file and use the print() function. Thanks a million.

name = input("Enter your name: ") print("Your name is: ", name) >>> print("Your name is: ", name) Traceback (most recent call last): File "<python-input-15>", line 1, in <module> print("Your name is: ", name) ^^^^ NameError: name 'name' is not defined >>> 

submitted by /u/West_Culture1257
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *