My Experiments with Python Part 2

Declaring a variable

car = "Maruthi"
print 'Hello World', 5+7, 6>9
print car


Results
madhut@SALES008-1 C:\Learning\python
> python Hello.py
Hello World 12 False
Maruthi
print 'Hello the sum of %d and %d is %d'%(2,3, 2+3)
Results madhut@SALES008-1 C:\Learning\python > python Hello.py Hello World 12 False Maruthi Hello the sum of 2 and 3 is 5

No comments:

 Python Basics How to check the version of Python interpreter mac terminal

Popular in last 30 days