How to print Hello World! using Python

First download Python on your computer and install it using Windows Installer.

I am using Python 2.7.2 Windows Installer (Windows binary — does not include source) for this code.

After installing Python go to Start>All Programs>Python 2.7>IDLE(Python GUI)

You will see a console such as the following one;

On this Shell if you write a code;

print  “Hello World!”

You will see Hello World text on the console output

Another approach for this code is to create a file with an extension such as

And calling it from the windows console

The content for

# this is a comment –>  Hello world python program
# Introduction to Python Development
# Hello World Progran
# author – Tuna TORE

print “Hello World!” # regular print statement

# this is a function
def hello():
    print “Hello World! Function”

if __name__ == “__main__”: # main method

The output for the program

Download file


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s