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 the result of 8 % 3?
Think about how many times 3 can fit into 8, and what is left.
Which operator would you use to check equality?
This operator checks if two values are the same.
What does the // operator do in Python?
Think about how you can get a whole number from division.
True or False: The expression 5 < 5 evaluates to True.
Consider the meaning of the less than operator.
Write a Python function that takes two numbers as input and returns True if both numbers are even and less than 20. Use logical operators to combine your conditions.
You need to check if both are even and under 20.
Create a Python script that accepts user input for age and checks if the user is eligible for a senior discount (age 65 or older) and is a member. Print a suitable message based on the inputs using comparison and logical operators.
Think about how to combine the conditions using logical operators.
6 more questions in this section. Enroll free to practise them all.
Enroll free