Python is a free, open source, cross-platform programming language that runs on multiple platforms like Windows, Linux and MacOS. If you are a beginner to Python programming, then begin with this article and continue with the flow.

 

In this tutorial, you will learn the Python basics which will include installation and execution of Python on your computer by writing our first Python program.

 

Python Tutorial for beginners - Getting started with Python programming language

 

This is first part of the Python Tutorial series for absolute beginners.

 

What is Python programming language?

Python is a free, open source programming language that is easy to learn, highly readable and simple to use. Guido Van Rossum, a Dutch programmer, wrote the Python language in late 1980's as a hobby. Since then, it grown high to become one of the most popular and polished programming language.

 

As Python is a cross-platform and interpreted language, you can write and build Python applications in Windows, Linux, MacOS and generate the same output on execution.

 

Python has a simple, clean and elegant English-like syntax. Hence, you can write less code and focus on the core business logic.

 

How to install Python on Windows 10?

Though you can install Python on Windows, Linux and MacOS, but in this post we are going to discuss installing Python on Windows platform. Follow the below mentioned steps to install Python:

  1. Download the latest version of Python from the official Python for Windows page.
  2. Run the installer and select Install for all users option.
  3. From the Optional Features page, select tcl/tk and IDLE to install the integrated development environment (IDE) for Windows.
  4. From the Advanced Options page, check the Add Python to environment variables to allow it run from any command prompt.
  5. Follow the on-screen instructions and complete the installation.
  6. To confirm the installation of Python, open a command prompt (Console window) and type python to invoke the interpreter in the immediate mode.
  7. Type 3 + 5 and hit Enter. This should return 8 as the output.
  8. To come out from the Python immediate mode, type quit() or press CTRL + Z and then hit the Enter key.

 

How to write our first Python program?

As we have already installed Python on our development environment on Windows 10, we can now start writing our first Python app and execute it from the console as well as from the Python IDE. Let's begin with a simple program that prints "Hello Python" in the output screen.

 

Open any text editor or the Python IDE from the Start screen. Then type the following code and save it as "hellopython.py":

print ("Hello Python")

 

If you are using simple text editor, open any Console window, navigate to the source folder where you saved the hellopython.py file and enter the following command:

python hellopython.py

 

If you are using the Python IDE, just run the file. You will see the "Hello Python" string printed on the screen.

 

 

Have a question? Or, a comment? Let's Discuss it below...

dhgate

Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.