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 will be printed if age = 20 and using: if age >= 18: print('Adult')?
Think of how the condition evaluates.
Which keyword is used to create a fallback option in a condition?
Consider the opposite scenario from the initial IF.
What does an IF statement do?
Recall how it checks a condition before executing.
If you use an ELSE statement, what does it represent?
Think about its role in providing an alternative path.
Create a simple text-based game where a player can enter different commands based on user input. Use IF-ELIF-ELSE to handle at least three different types of input.
Think about how you structure based on commands given by players.
Design a voting eligibility checker that returns personalized messages depending on the user's age and residence. Use multiple conditions.
Consider how different attributes affect eligibility.
5 more questions in this section. Enroll free to practise them all.
Enroll free