Programming Fundamentals

Week 1 | Lesson 3.1

LEARNING OBJECTIVES

After this lesson, you will be able to:

  • Review basic programming concepts (control flow)
  • Review lists and dictionaries
  • Review functions
  • Lightly introduce numpy

STUDENT PRE-WORK

Before this lesson, you should already be able to:

  • Explain what a list and a dictionary are and the differences between them and use them in your code
  • Explain if, if/else, and if/elif/else statements and use them in your code
  • Explain why control flow is important
  • Explain what a function is and cases where they are useful

INSTRUCTOR PREP

Before this lesson, instructors will need to:

  • Review what students have done to this point and identify weaknesses that may need more attention

LESSON GUIDE

TIMING TYPE TOPIC
5 min Introduction Control Flow and Python Review
35-40 min Guided Practice
40-45 min Independent Practice
5 min Conclusion

Opening and Review (5 mins)

Over the last few days we've gone over quite a bit of python.

  • Integers, floats, strings
  • Arithmetic operators, string operators
  • Variable assignment
  • Lists and dictionaries, operations on both
  • If, if/else, loops, functions
  • Iteration, libraries

There are 9 exercises in iPython notebooks within the starter-code folder to help you review and challenge your python coding abilities. They vary in difficulty. Hard problems are identified in the header.

Independent Practice: Topic (35-40 mins)

Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Problem 7 Problem 8 Problem 9

Pair up into groups of two to tackle one of the exercises. If you complete your assigned exercise, trying completing another one (or at least getting started on it).

Overview of Exercises (40-45 minutes)

Look over exercises that are of particular interest or that gave people trouble.

Conclusion (5 mins)

Take a breather. You've learned a lot the last few days and you've applied it. Well done. Onwards!

results matching ""

    No results matching ""