Simple Python Program to Print Hello World

In this post, we are going to make a Python Program to Print Hello World.
    This program is very useful for those fellows who want to learn the syntax of the python language.

    Simple Python Program to Print Hello world

    # Program Python Hello World.
    print("Hello world")
    Output: Hello world

    Simple Python Program to Print Hello world

    Print Hello World in Python using function

    In this program, we will print hello world in python using functions.
    def hello():
        print("Hello world")
    def helloname(str):
    str=input("Enter Your Name:")
    Hello world
    Enter Your Name: Sid
    Hello Sid

    Video explanation for Hello World program in Python

    It is a basic python program for beginners. print() is an in-built python function to print any strings, numbers, and characters on screen. You can also perform arithmetic operations using the print() function. But, you have to take care of one thing i.e., You should not use Quotation to perform arithmetic operations. let me take an example for this:

    • print("5+3") Output: 5+3
    • print(5+3) Output: 8
    the print() function will print all the things as it is in between the quotation. Without quotation, print(5+3): it will first calculate 5+3 which is 8, and then print it on the output screen.

    How to run Hello World Program in Python

    • You have to install python IDE and compiler.
    • After installing, search for python on your computer. click on Python(3.9).
    • Just type, your code and press enter. The output will display on the new line.
    Else, you can also install sublime text to write your programs in python and power shell window to compile and run it.
    • Download and install Sublime Text.
    • Open Sublime Text and write your code in it. 
    • Press Ctrl + s, the file name should have extension .py. For example
    • Open the folder, where you save it. Press shift and right click and click on the open PowerShell window here.
    • Enter python like python
    Program Python Hello World

    About this python program to print hello world: In this program, we learned about the syntax of python language to print characters, strings, numbers and to perform some basic arithmetic operations using the print() function in python. 

    Related python programs:

    Siddharth Jha
    • Hackerrank 5* • Full Stack Developer • Masters in SEO

    Related Posts

    Post a Comment