Module: Functions

The real power of programming.

Learning Outcomes

Programming Python

Implement algorithms in python.

Use & apply the 7 basic skills of computer programming

  1. Variables: storing information (numbers, text)
  2. Math & Logic: writing & evaluating expressions
  3. Input/Output (IO): getting information from the user (or a file/DB) and displaying information to the screen graphically or with the console
  4. Conditions: changing what code statements are executed under different scenarios (i.e., if the day is Sunday, sleep in; otherwise, get up at 6 am)
  5. Loops: repeat code statements (e.g.: while the sink is dirty, keep scrubbing)
  6. Functions: grouped set of statements to accomplish a task based on parameters (e.g.: given f(x)=x+5 then f(2) would be 7)
  7. Lists: store multiple pieces of information (e.g.: an array that stores the integers 1-5 or the letters of the alphabet)

Readings

Recursion

Think Python Chapter 5, Sections 5.8-5.10

2 pages by 2/27

Functional Programming

CS for All Chapter 2

22 pages by 2/27

Developing Functions

Think Python Chapter 4

7 pages by 2/27

Experiential Learning

HW5: Code Academy

Functions & Taking a Vacation

HW

Functions

HW

Recursion I

HW

Recursion III

Midterm Practice

Go with the (control) flow

Project 2

Turtle Drawing