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 does an if statement do?
Think about the condition that needs to be checked.
Write a simple if statement to check if age is 18.
Use equality operator to check the condition.
What does an if statement do?
Think about how the statement works based on true or false.
True or False? An if-else statement has two pathways.
Consider how decisions are made.
Write a program that takes a percentage and prints corresponding letter grades (A for 90+, B for 80-89, etc.) using if-elif-else.
Think about how to check ranges.
Create a program that allows the user to guess a number. Use conditionals to offer hints: 'Too high' or 'Too low'.
Consider how to guide the user based on their input.
4 more questions in this section. Enroll free to practise them all.
Enroll free