A variable created in a function does not exist outside the function! E.g.:
def calculateRectangleArea(width,length): rectangleArea = width*length return rectangleArea rectangleLength = 12.5 rectangleWidth = 3.0 rectangleArea=calculateRectangleArea(rectangleLength,rectangleWidth) print width
Will print this:
Traceback (most recent call last): File "test.py", line 8, in ? print width NameError: name 'width' is not defined