Original Example Article by Matthew Howell for Cyphr Magazine
When trying to get into coding, the first thing that puts people off is knowing where to start and what to do. Often times when asking a friend, they’ll say, “oh you should definitely try xyz” and then give a whole host of reasons why it’s an absolute pain to use. Here at Cyphr we feel that starting with Python can be a good option to ease a lot of the confusion for first timers and for those returning to coding.
What is Python?
Python is a high-level programming language meaning that it is a simpler way of writing code. It was created by Guido van Rossum and released in 1991. It is far more readable than other programming languages due to its use of whitespace, which helps programmers to write code that can easily be understood by humans later down the line.
In spite of its simplicity, it has widespread usage throughout many of the services and programs we take for granted, this includes YouTube, Google, Instagram, Reddit and Spotify. Python helps to allow for many of the features and back end functionalities which are key for keeping these services fully operational.
How do I get set up?
To start writing your own Python code, you’re going to first need to install the Python IDE (Integrated Development Environment), available at www.python.org/downloads/ and install the latest version of Python 3 for whatever Operating System your device is running. Once installed open it up and you’re in the IDE!
My First Program
Make sure you are running the Python 3 IDLE Program from the Desktop (as this is the actual IDE that you can work in). Once it’s open, you should see a screen which looks like this:
This is known as the Shell, and its where the output from the programs we are going to write will appear. To start, we first need to create a New Python Document to code in by going to File > New File. This will bring up a new window, which looks slightly different like this:
For this tutorial, we’re going to do a basic print command. This is basically a program which outputs whatever we have inputted within the print command, when it is run. Use the following command:
print(“Hello World”)
Now either press F5 or go to Run > Run Module to run our program. You should get a result like this:
And there you go! You’ve just run your very first program! More tutorials will be coming soon on how to work with Python, but at least now you’ve made a start on learning a very useful programming language.