Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is a control flow statement?
Think about how your program can make decisions.
Give an example of a conditional statement.
Consider the if-else condition.
Which of the following is NOT a control flow statement?
Think about which options directly control execution.
True or False: The continue statement can be used to exit a loop.
Remember the purpose of the continue statement.
Create a program that takes an integer from the user and prints whether it's positive, negative, or zero using if-else statements.
Use nested ifs to break down the conditions.
Write a program using a for loop that finds and prints all prime numbers between 1 and 100.
Think about how to check for factors efficiently.
5 more questions in this section. Enroll free to practise them all.
Enroll free