2. Hello World !
This is very simple and impressive !!
I am interested in writing programs using python , now onwards.
>>>
print "Hello World !“
print "This is very simple and impressive !!“
print " I am interested in writing programs using python , now onwards."
By using editor ,like VI , create “hello.py”
To run this program, just type
$python hello.py
3. sum.py
x = 10
y = 20
z = x + y
print z
$ python sum.py
30
>>>
5. To make executable .py program, just add top line
#!/usr/bin/env python
$chmod +x hello.py
$./hello.py
SETTING STANDARDS
Hello World !
This is very simple and impressive !!
I am interested in writing programs using python , now onwards.
>>>
6. #!/usr/bin/env python
print "Hello World !“
print "This is very simple and impressive !!“
print " I am interested in writing programs using python , now onwards."
hello.py
#!/usr/bin/env python
x = 10
y = 20
z = x + y
print z
sum.py
#!/usr/bin/env python
exam_fees = 10000
service_tax = exam_fees * 12.36 / 100
total_fees = exam_fees + service_tax
print total_fees
examfees.py
Final programs : .py
7. Thanks
Contact
Prof B N Kshirsagar
MIT Group of Academic & Research Institutions, India
www.mit.asia
prof.bnk at gmail dot com