Installing Python on your machine  

There are different steps for installing Python depending on your operating system. You can use the following guide to install Python.

Python 3 Installation & Setup Guide – Real Python
The first step to getting started with Python is to install it on your machine. In this tutorial, you’ll learn how to check which version of Python, if any, you have on your Windows, Mac, or Linux computer and the best way to install the most recent version in any environment.

Using Python on Repl.it

If you are just starting out, you will find it easier working with Python using Repl.it. We have written a guide just for that.

Working with Python interactive interpreter

Once, it's installed, you can check by using python3 on the command line.

The command-line application that opens up when you type, is called the interactive interpreter. The Python interactive interpreter lets us evaluate expressions rather quickly. Once, you start the python3 interpreter, you can play around to get used to it. Try the following commands in the interpreter.

You can check out the video below to understand how to evaluate expressions in the interactive interpreter.

Fun, isn't it? Programmers use interactive interpreter for prototyping programs. Actual python programs are written in scripts or files. Next, let's check out how to write a Python Script.

Writing and executing a Python script

To write a python script, open any text editor or code editor. Then write the following program and save it as hello.py

print("Hello World")
print("This is Primer !")
Our first python script: hello.py 

To execute the python program, navigate to the directory where the file hello.py and execute it using the following code.

That's it. You have successfully installed Python on your computer and executed a python script.