Section 1 - Instruction

Last time, we explored how logical operators like and, or, and not help us combine multiple checks into a single condition for our if statements.

Engagement Message

But what if one decision leads naturally to another decision?

Section 2 - Instruction

Sometimes, the action you take after one check depends on a further check. This is like making a decision within a decision. In programming, we call this nesting.

Engagement Message

Can you think of a real-life example where you make a decision based on a previous one?

Section 3 - Instruction

We can place an entire if/elif/else structure inside the code block of another if, elif, or else. This is a nested conditional. The inner check only happens if the outer condition allows it.

Engagement Message

It helps handle more complex scenarios. Make sense?

Section 4 - Instruction

Imagine checking if a user is logged in. they are, you might check they are an administrator to grant special privileges.

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal