Priyanshu Saraf
3 min readSep 19, 2020

What is Python, and your first “Hello World” program.

Python is a programming language. Seem to be a big word, although the language itself is not that hard. It does not have a huge learning curve, and it is a language which is highly valued in the growing era of technology. Personal preferences aside, Stack Overflow surveys prove just how popular the language is. Even if you don’t wanna have a job as a python developer, I am pretty sure that you’ll be able to find a use case of it in your daily life. For example, if you wanted to automate your lights, or scrape through the web for a particular product, or even make your own website, I am sure that you wont regret learning python. It is so simple, and it has an English-like syntax which makes learning the language really easy. So, lets start.

installation:Unfortunately, I don’t have a mac, so I can’t advice you on the installation of it. Although, I think that python comes installed in macs, so I think that if you install vs code, you should be good. For windows: Go to this site: https://python.org/ and download the latest python version, which is stable. Make sure that you are downloading the version recommended for most users. Your download should start as soon as you click on “Download”. The next thing that we are going to do is install a code editor. A code editor is simply a dedicated environment for us to write code. My personal favorite is visual studio code, or vs code for short. To download the code editor, head over to this site: https://code.visualstudio.com . Now, all that you have to do is click on download and you should be good to go. Coming back to python, lets start the installation. You can click on next for everything except the step where it says, “ADD TO PATH”. Make sure that the box over there is checked, other wise, you will have to do a procedure which is quite unnecessary. Just make sure that python is installed by going to your command prompt and typing out: python — version . If it doesn’t show you any errors, and it shows you the version you have installed, then you are good to go. Install vs code too, by just clicking on next for everything once opening the installing wizard and you should be good to go. Try to open vs code through the search menu and if you are able to open it, that’s pretty much it. One last thing, while you are on vs code, make sure that you install the recommended extension for python, which is simply going to be “python”. That’s pretty much it.

The “hello world” program: Writing hello world in python is quite simple. You should firstly create a new file, save it as: hello_world.py . note that I gave it a .py at the end. This is crucial if you want to write python code, although the first name can be anything. Now, open this file with vs code, and now, just type in : print(“hello world!”) . Yes, its that simple. There is nothing too fancy here. You are simply telling the compiler that you want it to print out hello world. Now, a few of the terms which I have used here might confuse you, although do not worry, This is going to be a series of blogs and you can read the next one to understand the stuff that’s happening here in a lot more detail. So, stay tuned! Coming back to our code, Well, we have written it, but how do we run it? That’s not that hard either. Go back to the folder location where you have created this file, and in the head portion of the file explorer, remove everything and type in “cmd”, and hit enter. This opens up the command prompt for windows, and now, you can type in: python hello_world.py . This simply runs the python file which we have made, which in our case was hello_world.py . So, now, Hit enter, and you should see something like: “hello world” in the next line. If you do, then congratulations! you have written your first python program!

Priyanshu Saraf
Priyanshu Saraf

Written by Priyanshu Saraf

Blogger, freelancer, and Tutor! Let’s connect on instagram! Here’s my handle: @saraf_priyanshu_

No responses yet