In this section of the course, we're going to dive into conditionals in a python. Now a conditional is one of the foundational concepts around what it takes to make a python program become dynamic.
As we've gone through this course on Python programming we've already seen a few previews of conditionals. Now in this section, we're going to dive in and analyze everything that we need to know in order to build in dynamic and conditional logic into our programs.
In the last guide, we walk through how you could build three different types of conditional statements in python. And now what I want to do is extend that and show you how you can use what is called the `ternary operator` which allows you to create a if else statement.
So far in the section on conditionals, we've walked through various syntax options when it comes to implementing dynamic behavior into our Python programs.
When it comes to implementing conditionals into a python program many times you do want a check for some of the various behavior that we've already looked at such as equality, inequality, and then the full set of greater than and less than kind of options.
In this guide, we're going to extend our knowledge on conditionals and we're going to see how we can actually add compound conditionals which means multiple conditions inside of a python program.
devCamp does not support ancient browsers.
Install a modern version for best experience.