Please send questions to
st10@humboldt.edu .
#!/usr/bin/python
"""
Module lect09_5
Example of a self-testing module (when run from command line)
modified from "Learning Python", Lutz and Ascher, O'Reilly,
pp. 173-174
adapted by: Sharon M. Tuttle
last modified: 10-24-06
"""
spam = 40
def square(val):
"""
return the square of the passed value <val>
"""
return val ** 2
if __name__ == "__main__":
print "Testing square: true's mean passed, false's mean failed"
print square(4) == 16
print square(7) == 49