Scripts

In the image below its says " If that file was called hello.py , we could run it from the command-line like this: ". How do i run this program?

This might seem kinda dumb but i first make a file called hello.py and in it wrote print(“howdy user”). Then i created a new file in the same folder and in it wrote $ python3 hello.py and ran it and it failed to run. What exactly am i supposed to do here and what exactly is a command-line?

link to the lesson

Hi, the answer to how to run really will depend on your operating system (Win/Mac/Linux). As for what a command-line is, it’s as it sounds: an interface where you issue your computer commands line by line. It’s incredibly powerful and versatile as you can be very precise about what you ask your computer to do.

If you have mac or linux the answer is fairly simple, you open a terminal and that shell your command-line. If you want to kind of simulate the experience in Windows you need something like WSL (link here for that: WSL 2: Getting started - YouTube).

For a general solid series on how to use command-line you can watch: Linux Command Line (01) What Is The Linux Command Line - YouTube

and also note codecademy has a module for learning command-line!

3 Likes