In this course, you learned about conditional statements and conditional logic. You saw how to compare values using comparison operators like <
, >
, <=
, >=
, !=
, and ==
. You also saw how to build complex conditional statements using and
, or
, and not
.
Next, you saw how to control the flow of your program using if
statements. You learned how to create branches in your program using if
… else
and if
… elif
… else
. You also learned how to control precisely how code is executed inside an if
block using break
and continue
.
You learned about the try
… except
pattern to handle errors that may occur during runtime. This is an important construct that allows your programs to handle the unexpected gracefully and keep users happy that the program didn’t crash.
Finally, you applied the techniques that you learned in this course and used the random
module to build some coin toss simulations.
To reinforce what you’ve learned here, complete the quiz in the next lesson. Then, head over to Python Basics Exercises: Conditional Logic and Control Flow.
bwhitehd on Jan. 11, 2023
There is nothing in the course slides but a single page with a picture. This should be updated.