Module: Control Flow

Making decisions with if conditions and repeating statements with for loops.

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

Conditionals

Think Python Chapter 5, Sections 5.1-5.7

4 pages

Simple Repitition

Think Python Section 4.2

1 page

Functions

Think Python Chapters 3 & 6

16 pages by 2/20

Experiential Learning

HW4: Code Academy

Conditionals & Control Flow, PygLatin

HW

Input & Ifs

HW

For loops & lists