Chapter 1 : Introduction to Programming

Example 1.1, Page No 21

In [1]:
print "Hello world"
Hello world

Example 1.2, Page No 22

In [1]:
dblPrice = float(raw_input("Enter Price Per Unit : "))
iNo = int(raw_input("Enter Quantity : "))
dblTotal = dblPrice * iNo
print "The Total Price Is : %d" % dblTotal 
Enter Price Per Unit : 100
Enter Quantity : 10
The Total Price Is : 1000
In [ ]: