22: Functions (1 of 2)

The Crystal Ball - Instruction Manual I: Introduction to Data Science · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under not declared, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    22: Functions (1 of 2)

    And now for the very last “pure programming” lesson of the book: writing functions. This is more or less the final tool in the programmer’s toolkit, and as I’ve learned over my years of teaching, it often causes the most trouble.

    Now you might be thinking, “hey waitaminit, we’ve known about functions since all the way back on p. 20. This is something new?” Yes it is. Previously in this book, we’ve done a lot of calling functions – from simple ones like len() and np.append() to complex ones like pd.read_csv() to scipy.stats.chi2_contingency() – that someone else has written for us. By contrast, in this chapter, we look behind the curtain and join the production staff: we write our own functions.


    This page titled 22: Functions (1 of 2) was last modified on Sun, 18 Sep 2022 02:06:05 GMT and is shared under a not declared license and was authored, remixed, and/or curated by Stephen Davies (allthemath.org) via source content that was edited to the style and standards of the LibreTexts platform.