Python Hello World: Creating Your First Python Application

In this tutorial we learn to write frist python program Hello World and learn to executeHello World. with How to save your code in a Python file. as well as Python program to display Hello World on the screen.

Creating a new Python project. First, create a new folder called helloworld .

Python Program to Print Hello world!

This page contains examples of basic concepts of Python programming like loops, functions, native datatypes and so on.

Python is a very simple language, and has a very straightforward syntax. A simple program that displays “Hello, World!”. Printing a message on screen is very simple in Python programming.

In this article, you will learn:

  • How to write your first "Hello, World!" program in Python.
  • How to save your code in a Python file.
  • How to run your code.

Python Program to Print Hello world!

The classic first program is “Hello, World!” Let’s adhere to tradition. Type in the following and press Enter:
Source Code

# This program prints Hello, world!

print('Hello, world!')

Resutls

Hello, world!

How to Check Your Python Version?

-> Press the Win key.
-> Type PowerShell(terminal).
-> Press Enter.
on Windows

C:\> python --version
Python 3.8.4

//OR

C:\> python -V
Python 3.8.4

on Linux

# Check the system Python version
$ python --version

# Check the Python 2 version
$ python2 --version

# Check the Python 3 version
$ python3 --version

On Mac OS

python3 --version

How to Download and Install Python 3.9 on Windows

here Steps to Download and Install Python 3.9 on Windows

Read Also:  how to write leap year program in python? - leap year program in python

Step 1: Download Python 3.9

Go to “https://www.python.org/downloads/”

Step 2: Run the .exe file

Step 3: Install Python 3.9

You can now start the installation of Python by clicking on Install Now:

Python Installation Tutorial for MacOs

python --version

Python Installation Tutorial for Linux

$ python3 --version

Open the terminal or Command prompt from your linux based OS.

$ sudo apt-get update

$ sudo apt-get install python3.6

$ sudo apt-get update

$ sudo apt-get install python2.7

How to Install Python on Windows?

Installing and running Python on your personal computer is no difficult task. It involves just a few simple steps:

Read Also:  factorial of a number in python

Step 1: First of all Download Python binaries from python.org : Go to “https://www.python.org/downloads/”

Step 2: And then Install the binaries

Step 3: Add Python to system environment variables

Step 4: and here Install pip

Step 5: [Optional] Install virtualenv using pip

Hello World: Create your First Python Program

first of all Creating a new Python project. and then here First, create a new folder called helloworld. and then last step to create a new app.py file and enter the following code and save the file:

print('Hello, World!')

we have described how you can create your first program “Hello World” in python. By following the steps described in this article you can easily create the “Hello World” program.

I hope you get an idea about How to Get Started With Python?.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.