Boston Python Workshop 8/Friday/Tutorial: Difference between revisions
Content added Content deleted
imported>Jesstess (→Types) |
imported>Jesstess (→Types) |
||
Line 83:
By the way, what is a "function"? Here are the important ideas about functions:
* A function encapsulates a useful bit of work and gives that work a name.
*
* To use a function, write the name of the function, followed by an open parenthesis, then what the function needs as input (we call that input the <b>arguments</b> to the function), and then a close parenthesis.
* Programmers have a lot of slang around functions. They'll say that functions "take" arguments, or that they "give" or "pass" arguments to a function. "call" and "invoke" are both synonyms for using a function.
|