Week 10
More Functions

Weekly Summary

Last week we introduced functions

All of the code we wrote last week was taking code we had already written as basic IPO problems and converting it to functions. This week we will practice more with functions but we will work with entirely new examples.

 

Learning Outcomes

By the end of the week students should be able to:

  • Reading Code
    • Given an existing function, and a set of input parameters to that function, identify the output returned by the function.
  • Writing Code
    • Given a problem statement that includes the name of a function and the parameters required by that function, write the Python code/definition of the provided function such that it solves the problem by returning correct output values.
      • For now, functions will be limited to those using
        • Mathematical Operators
        • Boolean Operators
        • Conditional Expressions
  • Debugging Code
    • Given a problem statement and a non-working Python function that attempts to solve the problem, identify where the function is incorrect and explain how to fix it.