Jan 1, 2013

Chapter 1 - Python Hello World Program


 


Step 1


 


Open any text editor (gedit,pico,vi,nano)


 


python-code-open


 


Enter the following python script and save the file with .py extension.


 


#!/usr/bin/python


#Author : Jijo K Jose


 


a="Hello World"


print 'First program was'


print a + "."


 


#END


 



 


python-code-in-pico-editor




 


Step 2


 


Change file permission to executable using chmod command.


 


python-change-file-permission-1



 




Step 3



Execute the python file.


 


python-hello-world-1



 




 

No comments:

Post a Comment