def myFunction( a, b, c ) : if a < 0 or a > 10 : raise ValueError, "a must be between 0 and 10" if b > 50 : raise ValueError, "b must be less than 50" return a*b + c
myFunction(-1,5,3) myFunction(5,100,2)
Related Scripts with Example Source Code in same category :