Learn Python 3 PowerShell help

I’m just getting started. And I’m not getting my Powershell to read the print from Atom. ls dose not list ex1.py. Even after I have lpthw or lpthw/ex1.py it will not open up this:

print(“Hello World!”)
print(“Hello Again”)
print(“I like typing this.”)
print(“This is fun.”)
print(‘Yay! Printing.’)
print(“I’d much rather you ‘not’.”)
print(‘I “said” do not touch this.’)

Can anyone help me? Am I the only one with this problem?

@evansdarryl3
hello
gonna need a bit more information to assist, do you get an error message?

at the powershell prompt I use the command: python ex1.py
and it runs as expected,

What are you typing at the command prompt, yours should look like page 11.
let us know
jason

I believe you may be doing one of these things:

  1. You’re not saving the file before trying to run it. Type: cat ex1.py when in PowerShell to see if it has the contents.

  2. You’re trying to run it from within Atom, rather than running it inside PowerShell. Watch the video to see how I do it.

  3. Having an error when you run it but we don’t see the error. Please post a screenshot of your error.

Hi Jason, glad to have your support. I found that I have to use this .\ex1.py in order for me to see it in power shell. Thanks for your information because the cat ex1.py has answered my question. Thanks again!

Thank’s Jason, on my computer I had to use .\ex1.py
Thank you

Thank’s Zedshaw,
I had to use .\ex1.py
I think I’m starting to catch on to what’s going on. I’ll just keep doing the exercise and writing down what I can’t understand.
Happy New Year!

@evansdarryl3
thanks for letting me know, but now I’m trying to work out why

‘python ex1.py’ and ‘python .\ex1.py’ both work on my computer if I’m in the folder containing ex1.py for dos and powershell, I think ‘.’ just means current directory,

maybe somebody else reading this can shine some light.
jason

Just use python to run your stuff. It works way more reliably on multiple platforms and prevents a lot of errors.

I’m a little late on this reply. Yes it looks like page 11. Every things O.K.