Computer Science for Beginners
Lesson 4: Python Lab Part 2
Lesson Date: 2024-07-21
Topics
- Lab-only, no lecture.
- Students should bring their laptops and expect to write code (or if they haven’t yet, get help with setting up their IDEs to write some code), or pair up with other students and write code together.
- Work through Exercism exercises together as a class.
- Currency Exchange in Python
- Meltdown Mitigation in Python
- Using
lambda
to define several simple check functions, which can be evaluated within a for loop, can be another way to efficiently check against a list of cascading if
-elif
-else
conditions.
- This is the essence of a “rules engine”, or list of rules.
Reading