Input function wont work properly


Update: There was a simple solution. From the File menu in Powershell I just selected "Start Powershell.exe, and on the new screen that popped up all the code works properly. I thought I was already using powershell.exe, but I guess it was the Windows Powershell ISE.
Thanks for you guys trying to help!

First off I am a newbie, but I just installed atom and powershell, and am trying to run a basic input program, and it won’t work properly. The code is:

x=input(“Enter your name:”)
print(“Hello”, x)

When I run this code, it does nothing at all. There’s no statement, there’s nothing. When I change the code to:

print(‘Enter your name:’)
x = input()
print('Hello, ’ + x)

It says: Enter your name:
but then when I try to enter my name, it doesn’t take any of the characters I enter. It looks like a never-ending loop though because it just keeps working, and I have to hit ‘Stop Operation’ on Powershell just to continue working.

I’m afraid there’s some terribly simple explanation to this, but I’m also worried that I am unable to create the most basic program. Any help would be appreciated.


It’s working perfectly for me… i find it odd that it’s not letting you output what you want to to do…

maybe it has to do with the python version you’re currently running?


This could be your version of Python.


python —version

You want Python 3 not 2.7 really.

If you are using Python 2 then I think you need to amend your script to

x=raw_input(“Enter your name:”)
print(“Hello”, x)


Ohhhhhhhhhhh yes PowerShell ISE totally ignores the PATH you set so that would be the reason.