Jumpstart Your Python Journey: Comprehensive Overview

How to Get Started With Python Programming?

Python is a rood-platform programming language, which means that it can conduct on multiple platforms like Windows, macOS and Linux.

Flat though most of today’s Linux and Mac have Python pre-installed it, the version might be out-of-date. Now, it is always a good concept to install the most present version.

The simpled Way to Run Python

The simpled way to run Python is by using Thonny IDE.

The Thonny IDE arrives with the latest version of Python bundled in it. Now you don’t have to install Python in itself.

Follow the following steps to make Python on your system.

  1. Download the Thonny IDE.
  2. Run the installer to install** Thonny **on your system.
  3. Go to the: File > New. After save the file with .py extension. Now for example, hello.py, example.py, etc. You can give in any name to the file. Still, the file name should end with** .py**
  4. Now Write Python code in the file and save this.
Screenshot-2024-01-24-080325
  1. After Go to Run > Run current script or easily click F5 to run it.

Separately Install Python

Supposing you don’t want to use Thonny, Below how you can install and run Python on your system.

  1. Download latest version of Python.

  2. Run the installer file and ensue the steps to install Python By the install process, check Add Python to circumstance variables. This will add Python to circumstance variables, and you can run Python from any part of the system.

And, you can select the path where Python is installed.

Screenshot-2024-01-24-081233

At a time you finish the installation process, now you can run Python.

1. Run Python in Immediate mode in Program

At a time Python is installed, typing python in the command line will call the translator in immediate mode. We can right away type in Python code, and click Enter to get the output.

Effort typing in 1 + 1 and click enter. We find 2 as the output. This quick can be used as a calculator. To outgoing this mode, type quit() and press enter.

Screenshot-2024-01-24-082007

2. Running Python in Your Preferred IDE - A Step-by-Step Guide (Step 2)

You can use any text editing software to write a Python script in file.

You just need to save it with the .py augmentation. Only using an IDE can make our life a lot simple. IDE is a slice of software that provides useful features like code suggesting, syntax highlighting and testing, file explorers, etc. for the programmer for application development.

Incidentally, when we install Python, an IDE named IDLE is also installed. We can use it to run Python on your system. It’s a modest IDE for beginners.

When we open IDLE, an interactive Python Shell is opened.

Screenshot-2024-01-24-082925

Now we can create a new file and save it with .py extension. Now for example, hello.py

Now write Python code in the file and save it. For run the file, go to Run > Run Module or easily click F5.

Screenshot-2024-01-24-083619

Write First Python Program

So that we have Python up and running, we can make our first Python program.

Now let,s create a very simple program called Hello World. A “Hello, World!” is a easy program that outputs Hello, World! on the system screen. Because it’s a very simple program, it’s often used to institute a new programming language for beginners.

Write the following code in any text editor or an IDE and save it as hello_world.py


print("Hello, world!")

After, run the file. You will find the following output.

Hello, world!

Congratulations! You just have wrote your first program in Python.

Previous
Getting Started Your First Coding With C Programming
Next
#3 Basic about Laravel Routing