21.5 - Nested IF and Loops
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
What does a nested IF statement do?
💡 Hint: Think about what happens when you place one IF statement inside another.
Write an example of a simple nested IF statement.
💡 Hint: Consider checking a number against two conditions.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What is a nested IF statement?
💡 Hint: Remember how we combine IFs.
True or False: A FOR loop can only loop through numbers?
💡 Hint: Think about all the types of data structures we can loop over.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Write a program that counts how many even and odd numbers there are in a list of numbers using nested IF statements within a loop.
💡 Hint: Consider how you could maintain two counters for each category.
Imagine you have a list of users with some having notifications. Write a program that sends notifications if a user has any messages, using nested loops.
💡 Hint: Think about how to check if a user has messages before trying to notify.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.