Anonymous user
Boston Python Workshop 8/Friday/Tutorial: Difference between revisions
Boston Python Workshop 8/Friday/Tutorial (view source)
Revision as of 01:11, 12 July 2013
, 10 years agono edit summary
imported>Jesstess |
imported>Jesstess No edit summary |
||
Line 81:
So now we've seen two data types: <b>integers</b> and <b>floats</b>.
By the way, what is a "function"? Here are the important ideas about functions:
* Functions encapsulate some useful bit of work. We save that useful bit of work inside the function so we don't have to type it over and over again every time we want to use it. So, for example, some nice person decided that being able to determine the type of an object was useful, so he or she put the Python code that figures out an object's type into the function <code>type</code>, and now we all get to use it, instead of having to write it ourselves.
|