21 - IF, FOR, WHILE
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
Write an IF statement to check if a number is greater than 10.
💡 Hint: Think about how to structure a simple decision.
What does a FOR loop allow you to do?
💡 Hint: Consider what happens when you know how many times to repeat an action.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What does the IF statement do?
💡 Hint: Think about how decisions are made in programming.
True or False: A FOR loop is used when the number of iterations is known.
💡 Hint: Consider the difference between fixed and variable iterations.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Write a program that finds the largest number in a list using IF statements and a FOR loop.
💡 Hint: Think about how to compare each number to find the largest.
Implement a WHILE loop that continues to prompt the user for a password until they enter the correct one.
💡 Hint: Consider how to keep asking until the correct input is received.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.