Boston Python Workshop 3/Friday/Tutorial: Difference between revisions

imported>Jesstess
imported>Jesstess
Line 673:
return x + y
</pre>
 
You can return any Python object: numbers, strings, booleans ... even other functions!
 
<b>Step 4: use the function</b>
 
Once you define this function, you can use it:
Line 681 ⟶ 685:
</pre>
 
Functions don't have to return anything, if you don't want them to. They usually return something because we usually want to be able to assign variables to their output.
 
==End of Part 2==
Anonymous user