First simple program, "Hello World" - Python

Here I am going to teach you how to make your first simple programing with python, this program will print simple text on the screen.

Simply open the Python IDE

We can print any text using the print command.
Explanation of the print commands: print is english word, then a space and then write your any text which you want to print within double quotes symbols. print "Your text here"
In python shell type print "Hello World" and press enter It will give text Hello World as output.



>>> print "Hello World" <-- this is your syntax code which you will write.
Hello World <-- this will come out as output.

So this was simple first your python program to print anything on screen with simple command :)
Try it with more words whatever you want.
Some more examples are given below

>>> print "Hi, My name is Aaqil" <-- User input
Hi, My name is Aaqil <-- Python output
>>> print "It is raining today" <-- User input
It is raining today <-- Python output
>>> print "I live in Pakistan" <-- User input
I live in Pakistan <-- Python output
>>> print "You are ugly monkey" <-- User input
You are ugly monkey <-- Python output

Comments

Post a Comment

Share post using share buttons or leave a comment