Open In App

Getting Started with Python Programming

Last Updated : 10 Nov, 2025
Comments
Improve
Suggest changes
49 Likes
Like
Report

Python is a versatile, interpreted programming language celebrated for its simplicity and readability. This guide will walk us through installing Python, running first program and exploring interactive coding.

Install Python

Before starting this Python course first, you need to install Python on your computer. Most systems come with Python pre-installed.

To verify if Python is available on your computer, open command line interface (Command Prompt on Windows or Terminal on macOS/Linux) and type:

python --version

If Python is installed, this command will display its version but if it is not installed then to install Python on our computer, follow these steps:

  • Download Python: Go to the official Python website at https://www.python.org/ On the homepage, we will see a "Downloads" section. Click on the "Download Python" button.
python-site
python.org website
  1. Choose Version: Select the recommended Python 3 version for your operating system (Windows, macOS, or Linux) on the download page.
  2. Add to PATH (Optional): On Windows, enable "Add Python to PATH" for easier command-line access.
  3. Install Python: Click “Install Now” to copy required files to your system.
  4. Verify Installation: Open Command Prompt or Terminal and run python --version to confirm the installation.
Python-version-02
Python Version

Step By Step Installation Guide:

That's it! Python should now be installed on your computer, and you're ready to start using Python.

Create and Run Your First Python Program on Terminal

Once you have Python installed, you can run the program by following these steps:

  1. Open a text editor like Notepad on Windows, TextEdit on macOS or any code editor like VS Code, PyCharm, etc.
  2. Copy the code: - print('Hello World') above and paste it into the text editor.
  3. Save the file with .py extension like Hello.py.
  4. Open the terminal.
  5. Run the program by pressing Enter.
Python-Script
Python Script

You should see the output "Hello World" printed in the terminal.

Using Python’s Interactive Shell

For quick experiments, use Python’s interactive shell:

1. Launch the Shell:

python

or, if required:

python3

Python-Interactive-Shell
Python's Interactive Shell

2. Enter Commands Directly:

For example:

>>> print("Hello, World!")

Python-Interactive-Shell-2
Python Script on Shell

3. Exit the Shell:

exit()

Python-Interactive-Shell-3
Exiting the Shell

Next Steps

With Python installed and your first script running, continue your journey by exploring:

Using Python on Google Colab

Google Colab is a cloud-based platform that provides an interactive Python environment for running Python code. It allows us to write and execute Python code in the browser without installing anything locally.

Steps to Get Started on Google Colab:

  1. Open Google Colab: Go to Google Colab. You will need a Google account to access it.
  2. Create a New Notebook: After logging into your Google account, you can create a new notebook by selecting File > New Notebook. This will create a fresh Python environment where you can start coding.
  3. Running Python Code: In Colab, you can directly write Python code in cells and run them interactively. To run the code in a cell, click on the play button next to the cell or press Shift + Enter.

Example:

Colab
Snapshot of Google Colab

We can also use any other IDE for executing Python codes.


Article Tags :

Explore