Hello, World!

Your First Bit of Code

Everyone starts with the first program that was ever ran on a computer with a visual interface:

Hello, World!

The purpose of the program is to tell the Python interperter to show “Hello World” on the screen.

Go to your terminal and type the following to check for Python:

python3 --version

If you get an error, be sure to install it. On MacOS, I recommend HomeBrew, but you can use your package installer of choice. For HomeBrew, do the following:

brew install python3

This will install the package and dependencies. If the final readout gives further instructions, be sure to follow those.

Now… back to our regularly scheduled programming. Type the following into your terminal prompt and hit enter:

python3

This will initialize the Python interpreter and let you play with some code without hurting anything.

Now, type the following and hit enter twice.


print("Hello, World!")

You should see: Hello, World!

Congratulations 🎉 - you’ve just written your first bit of code. While I know this may not feel revolutionary, it is a great exercise to get going (it’s a required thing to call yourself a dev 😜).