NameError ex1. tripping at the first step!

Hi Peoples,
Your help is much appreciated, this is kind of embarrassing.
I have looked for similar error message posts - but this occurs sooner. I apologise if this is annoying duplication.

I have downloaded Python 3.8.2. and have Atom.

When I am in Powershell, I can see that (Exercise 1) and are in a directory labelled lpthw. I can initiate python from the powershell, but cannot run the files (when entering either or ex1) I get a ‘NameError’, and it says the name ‘ex1’ is not defined.

I can run the first file ( from within Atom to the Python terminal, but get the same ‘NameError’ message when I attempt to run the second file.

This is the message that I get in PowerShell.
Traceback (most recent call last):
File “”, line 1, in
NameError: name ‘ex1’ is not defined.

Any help would be most appreciated.
thanks heaps in advance,

In Powershell, are you firing up Python and then typing If so, that’s the error, you need to pass the script as an argument to the interpreter: python (make sure you’re in the directory where the scripts are located).

If you’re doing that right already, feel free to post your script and we’ll take a look.

Yes, are you able to post a screenshot so we can see?

Got it - thank you so much.

1 Like