Structure

  • The field of programming
  • Installing Python
  • Rapid-fire program
  • Basics of code
  • printing
  • getting input
  • Variables
  • if statements
  • loops
  • functions
  • the art of code
  • going further

This is a little launchpad guide for people wanting to enter into the world of programming.

The Field of Programming

Programming (computer science) is such a huge and varied field that it almost feels unfair the categorize it all under one name. For those invested enough to get even a basic understanding of programming the limit to what you can do really is just your imagination.

Python

Python is a great beginner-friendly programming language. It is well suited learning. It is very well supported and featured, for many people, Python is a great first and last programming language.

Installing Python

If you are one a MacOS or Linux computer there is a good chance that you already have Python installed. To check, try opening a terminal and running python --version The output should be something like this:

$ python --version
Python 3.13.3

Line starting with $ are lines that are typed in.

This means that my version of Python that I have installed is version 3.13.3, make sure that you have at least version 3 installed, not version 2.

If you don’t have Python at least version 3 installed, you can install it from the website python.org (or using a package manager if you know how).

Once you have Python installed, open up a terminal and run python (or python3 if that doesn’t work). This should put you in something called a REPL, a sort of environment where you can write code and see it run immediately. It should look something like this:

$ python
Python 3.13.3 (main, Apr 22 2025, 00:00:00) [GCC 14.2.1 20250110 (Red Hat 14.2.1-7)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Hello, world!

It is a sort of tradition among programmers to print the words “hello world” first thing when using a new programming language. Let’s do that now. In your REPL type in the following:

print("Hello, world!")

When you press Enter, your REPL should print out “Hello, world!” You did it! Your very first program.

Going further

Looking closer at what we just wrote, you can see that there are two main segments:

  1. print()
  2. “Hello, world!”

If you are familiar with math, this is very similar to a function f(x) where f is print and the string “Hello, world!” is the input to the function. The function itself, simply prints out whatever the input it is given is.

As a challenge, try modifying what it prints, can you make it print your name? A greeting? What code will print the following:

123 abc

Programming is Lego Bricks