Program Flow: Conditional Statements

Deciding When Code Will Run

Conditional statements are another way we can control the flow of our program. They allow us to execute code only under certain conditions that we define.

if statements #

Let’s start with an example. Given the variable temperature, we want to inform a user about weather conditions.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy