Boston Python workshop 2/Friday tutorial: Difference between revisions
Content added Content deleted
No edit summary |
(→Types: fixed a typo) |
||
Line 71: | Line 71: | ||
So in this case 'type' is the name of the function, and it takes one argument; in the example we first give <code>type</code> an argument of 1 and then give it an argument of 1.0. |
So in this case 'type' is the name of the function, and it takes one argument; in the example we first give <code>type</code> an argument of 1 and then give it an argument of 1.0. |
||
* Functions are a lot like functions in math class. You provide input to a function, and it possibly produces output. The 'type' function takes data as an input, and |
* Functions are a lot like functions in math class. You provide input to a function, and it possibly produces output. The 'type' function takes data as an input, and produces what type of data the data is (e.g. an integer or a float) as output. |
||
===Command history=== |
===Command history=== |