Monday, 6 October 2014

Simple Python Programming

Assalamualaikum w..b.t. and hello to all my friends and lecturer. In this post, I would like to share a tutorial in learning basic Python programming.

Before we begin, first of all you need to download the Python installer on the website below:
Link: https://www.python.org/downloads/release/python-341/


Choose the installer based on your own Operating System.

Then, installed it on your device PC,  Laptop, and etc.

After the installation complete just locate the installed apps and run it.

Traditionally, the first program of every programmer in every new language prints "Hello, World!".

To execute this program, type:

print ("Hello World")

and press "Enter".

if you got the output, you are done.If not please check your syntax.


Next, you can do some mathematical calcution using Python.

Type,

a=5
b=7
c=a+b

print ("The answer is => ", c)






Done.

May this tutorial give some benefit to all of us and encourage us to discover more about Python.

No comments:

Post a Comment