--- BartlebyScrivener <[EMAIL PROTECTED]> wrote:
> On May 26, 1:43 pm, Steve Howell
> <[EMAIL PROTECTED]> wrote:
> > ------
> > # def defines a method in Python
> > def tax(itemCharge, taxRate = 0.05):
> > return itemCharge * taxRate
> > print '%.2f' % tax(11.35)
> > print '%.2f' % tax(40.00, 0.08)
> >
>
I decided to go with a simpler example up front.
------
# def defines a method in Python
def say_hello(name):
print 'hello', name
say_hello('Jack')
say_hello('Jill')
More here:
http://wiki.python.org/moin/SimplePrograms
Somebody also fixed a few style things in my other
examples, changing a tuple to a list, catching a more
specific exception. Whoever you are, thanks, I agree.
____________________________________________________________________________________Sick
sense of humor? Visit Yahoo! TV's
Comedy with an Edge to see what's on, when.
http://tv.yahoo.com/collections/222
--
http://mail.python.org/mailman/listinfo/python-list