Evaluating expressions
A simple program (saved as simple.py
):
rectangleLength = 12.5
rectangleWidth = 3.0
rectangleArea = rectangleLength * rectangleWidth
print "The area of the rectangle is: ", rectangleArea
prints this on screen:
$ python simple.py
The area of the rectangle is: 37.5