-2

I'm very new to Python and tried out these codes I got from a tutorials

name = input("Enter your name: ") 
age = input("Enter your age: ")
print("Hey, " + name + age)

The codes run in the tutorials, but sublime text only print out "Enter your name: " and nothing else happened after I put in my name. What can I do to fix this?

enter image description here

Mohammd Omar
  • 31
  • 1
  • 8
  • Sounds like the environment you're executing the script in is not registering the enter key (assuming you pressed it) as the end of the input. Perhaps you should run it in another interpreter. – khelwood Oct 02 '21 at 11:49
  • The issue isn't Python but sublime text. It looks like you ran that individual line but not the whole script (I don't use sublime text, so I don't know if it has such a facility to run a single line in the console. If not, the issue is something else). – John Coleman Oct 02 '21 at 11:51
  • Try executing it in another editor. – CompEng007 Oct 03 '21 at 07:21

1 Answers1

0

You can fix it by using Sublime REPL, search about it on youtube

But I recommend you to run your codes by using Cmd (terminal)

Since you are a beginner, I recommend you to learn Cmd (command line) from youtube because it is very important for every programmer.

I hope that I helped you :)

Mohammd Omar
  • 31
  • 1
  • 8