Unit 1, Lesson 4
Topic | Description | Link |
---|---|---|
Lesson | Jupyter notebook with instructions and empty cells for codealong | Link |
Exercises | Jupyter notebook of 5 challenging exercises | Link |
Solutions | Sample solutions to codealong | Link |
Exercise Solutions | Solution code for 5 challenging exercises | Link |
- Explore
Python
control flow and conditional programming. - Implement
For
andWhile
loops to iterate through data structures. - Apply
if, else
conditional statements. - Demonstrate error-handling using
try, except
statements. - Combine control flow and conditional statements to solve the classic "FizzBuzz" code challenge.
Before this lesson(s), students should already be able to:
- Know python data types: string, int, float, boolean, tuple, list, dictionary
Total Time: 90 min
- Conditional statements (
if
/else
statements)- Eat some broccoli ice cream
- Get feedback on our health test
- For Loops
- Greet our instructors
- Loop through a range
- Loop through unpacked tuples
- While Loops
- Creating a loop that stops randomly
- Create an infinite loop
- Error Handling
- Stop ourselves from accidentally dividing by zero, which would really wreak havoc
For more information on this topic, check out the following resources:
- Automate the Boring Stuff with Python: Free book/blog here.