[Tutor] Python Question

Keith Winston keithwins at gmail.com
Fri Jan 10 11:13:26 CET 2014


Amy, you may want to get a little clearer on the difference between
defining a function, and calling one. The definition is sort of a
generic process, it's when you are calling it that you really fill in
the blanks, and the function does what it's designed for (whether you
like it or not!).

You might even try breaking it down a little further, maybe write a
function with just one parameter, and call it a few times to get the
hang of it. In fact, try calling some of the built-in functions (for
example, you can get the length of a string s = "hello" by calling
'len(s)'). You can do all this at the python prompt, but as things get
more complicated it's less frustrating to do it saved to a file (are
you doing all this in IDLE?).

keith


More information about the Tutor mailing list