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.
Write a simple if statement to check if a number is positive.
Think about comparisons with zero.
Create an if statement that checks if a string is equal to 'hello'.
Remember to compare using '==' operator.
What does the if statement do?
Focus on the definition of the if statement.
True or False: Indentation is required for Python control flow statements.
Consider why indentation is important in Python.
Design a program that prompts the user for their age and checks if they qualify for a driver's license (usually 16 or older).
Think about how to get user input and validate against a condition.
Create a program that categorizes a number as 'Positive', 'Negative', or 'Zero'.
Use multiple conditions to check the number.
5 more questions in this section. Enroll free to practise them all.
Enroll free