Newb Question – Run and Debug Issue /u/STR_Guy Python Education

Hello everyone, pardon the newby IDE setup question. I’ve installed the most recent version (3.13.1). I am going through a few classes on the basics. And I’m bumping into an issue when I go to run my Run and Debug my code. When I click the Run and Debug button, it runs my code utilizing inputs just fine. But when I do a Shift-Enter to run just a selection, I get the following error: NameError: name ‘john’ is not defined . John being whatever you type into the input.
It is as though the selection run processes the code through a different processor or something. What am I doing wrong here?

Thanks in advance.

Example of my code snippet:

user_name = input('What is your name? ') fav_color = input('What is your favorite color? ') print(user_name + " likes " + fav_color) 

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

​r/learnpython Hello everyone, pardon the newby IDE setup question. I’ve installed the most recent version (3.13.1). I am going through a few classes on the basics. And I’m bumping into an issue when I go to run my Run and Debug my code. When I click the Run and Debug button, it runs my code utilizing inputs just fine. But when I do a Shift-Enter to run just a selection, I get the following error: NameError: name ‘john’ is not defined . John being whatever you type into the input. It is as though the selection run processes the code through a different processor or something. What am I doing wrong here? Thanks in advance. Example of my code snippet: user_name = input(‘What is your name? ‘) fav_color = input(‘What is your favorite color? ‘) print(user_name + ” likes ” + fav_color) submitted by /u/STR_Guy [link] [comments] 

Hello everyone, pardon the newby IDE setup question. I’ve installed the most recent version (3.13.1). I am going through a few classes on the basics. And I’m bumping into an issue when I go to run my Run and Debug my code. When I click the Run and Debug button, it runs my code utilizing inputs just fine. But when I do a Shift-Enter to run just a selection, I get the following error: NameError: name ‘john’ is not defined . John being whatever you type into the input.
It is as though the selection run processes the code through a different processor or something. What am I doing wrong here?

Thanks in advance.

Example of my code snippet:

user_name = input('What is your name? ') fav_color = input('What is your favorite color? ') print(user_name + " likes " + fav_color) 

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

Leave a Reply

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