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

Content added Content deleted
imported>Jesstess
imported>Jesstess
Line 625: Line 625:
Running this assigns the type of <code>5</code> -- an integer -- to <code>x</code>.
Running this assigns the type of <code>5</code> -- an integer -- to <code>x</code>.


We can right our own functions to encapsulate bits of useful work so we can reuse them. Here's how you do it:
We can write our own functions to encapsulate bits of useful work so we can reuse them. Here's how you do it:


<b>Step 1: write a function signature</b>
<b>Step 1: write a function signature</b>