Introduction: Teach Me Python #2: Your First Program
Welcome to the second tutorial in the series. Today we will be coding your first python program.
Step 1: Open Geany
If you have been following the tutorial you should have downloaded and installed geany, to find it, look on your desktop if you installed desktop shortcuts if you have not, go into search and type in geany
Do not move the geany program. If you want to move it create a shortcut to it and move that instead
Step 2: The Code
After opening geany you should see something like the second image but without the untitled document open. The thing we are going to do is open a new document in new then immediately save it as helloworld.py. You should notice that in the bottom right corner it recognises the file as a python file. Next what we are going to do is type the following code:
What this does is the print statement will output the text in inverted commas to the terminal when it executed. The final step of this tutorial is to either press F5 on your keyboard or press the cog icon on the top bar in geany. This will execute your python script and a terminal should appear with the text 'Hello World'. If it comes up with any error it will be because you have misspelt something or python is not installed (see teach me python #1 for information on installing)
We have a be nice policy.
Please be positive and constructive.