Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
Write a simple Python program to check if a number is positive or negative.
Think about what conditions need to be checked.
Create a program that prints whether a user input is even or odd.
Use if to check if the number % 2 equals 0.
What statement is used to check conditions in Python?
Think about what structures control program flow.
True or False: The else statement executes when the if condition is True.
Recall what happens when conditions aren't met.
Design a program that outputs whether a number is a prime number or not, including error handling for invalid inputs.
Remember to validate the number before checking if it's prime.
Create a voting eligibility program that includes state-specific rules, checking not just age and ID but residency.
Nested conditions will help refine eligibility based on multiple factors.
7 more questions in this section. Enroll free to practise them all.
Enroll free