Functions are also useful (even necessary) in various approaches to problem solving. If you need an example one might be the recursive matrix solution approach I posted a link to in another post to this list.
Lee C
On Apr 17, 2005, at 12:29 PM, Joseph Quigley wrote:
Hi all, Another function question.....
def bar(x, y): return x + y
bar(4, 5)
So I can put anything I want in there. What good is a function like that?
Of course I know about.
def foo():
print "Hello all you who subscribe to the Python Tutor mailing list!"
So what do you use the def bar(x, y): return x + y
bar(4, 5)
functions for? (I just need a simple example) Thanks, Joe
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor