Module 3: Functions

Breaking code up into managable building blocks (abstraction!)

Language Topics

  • Function calls; passing in parameters and using the return value
  • Function definitions; specifying the parameters and writing the body
  • Module creation and import
  • Function and module scope, Python memory management

Textbook chapters 6 and 11 (also memory explained in 2.1)

Assignment: Mountain Paths

Due Tuesday, 11/1

Tue, Oct 11

Module 2 Recap

Exam recap

Brief intro to functions

Thu, Oct 13

Abstraction with Functions

File I/O lab recap

Tic Tac Toe Assignment recap

Functions

Fri, Oct 14

Lab


Lab assignments (due Thu)

Tue, Oct 18

Image Encoding

Lab recap

Displaying digital images

Manipulating image pixels in code

Assignment: Mountain Paths

Thu, Oct 20

Complexity

Assignment: Mountain Paths

  • Best path algorithms

Function Problems

Fri, Oct 21

Lab


Lab assignments (due Thu)

Tue, Oct 25

Functions Workshop

The Perlin Noise Lab Functions


Assignments

  • Create an exam problem and bring it (written)
  • Write out 2 specific questions about functions you want to discuss on Thu

Thu, Oct 27

Module Review

Mock exam questions

Exam review questions

Functions and memory

Fri, Oct 28

Lab

Module 3 Exam

Lab review (con't)

  • Perlin Noise array generation
  • 2D array reading example

Lab assignments

  • Perlin Noise lab (due Tue 11/1)
  • Mountain Paths assignment (due Thu 11/3)

Tue, Nov 1

Still Functions

Exam recap

  • Breaking down the AB problem step-by-step

Exam follow-up

  • If scored < 320 on Questions 1-6: Complete these Practice Problems and bring to class (hardcopy) on Thursday.
  • Else, scored < 90% on either Poker question: Finish it and bring to class (hardcopy) on Thursday.
  • Else, take Thursday off

Perlin Noise lab wrapup - testing and debugging

Assignment questions


Assignments (in order of priority)

  • Exam follow-up Questions 1-6
  • Finish Mountain Paths assignment for Friday
  • Exam follow-up Questions 7 and 9

Thu, Nov 3

Module Review

Practice Problems workshop

Poker solutions workshop

  • Comparing solutions
  • Helpful functions?
  • The Pythonic approach

Fri, Nov 4

Lab

Mountain Paths

  • Turn in before lab!
  • Workshop to complete for all who did not finish

Lab assignments

  • No labs this week
  • Mini make-up exam on Tuesday!