Blogger templates


Monday, 14 January 2013

How To Create Your First Python Program

Wanna learn how to create your first python program , but don’t know where to start. This is beginner, step by step tutorial with images that will help you trough process.
Step 1
Go to , download latest version and install it.

Step 2
Run IDLE (Python GUI)

Step 3
You can run program via python shell or you can run program as python module . py extension.
Step 3.1
Run program via python shell
In Python shell type
variable = 'Hello World'
and press enter

then type
print variable
and press enter, output will be Hello World

This is simple example where we store string “Hello World” into variable and then print it out.
Step 3.2
Run as python script . py
Open notepad and type your code
variable = 'Hello World'
print variable

save as

Open IDLE and go to File -> Open and open file with .py extension

After this will appear windows where you’ll able to run module, just press F5 or go to Run
-> Run Module

No comments:

Post a Comment

give us feed back to improve our service