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 is the result of x = 15 and y = 4, then print x + y?
Use the addition operation.
What is x % y when x = 15 and y = 4?
Think about the remainder after division.
What output will the following code produce? x = 15, y = 4; print(x ** y)
Think about how exponentiation works.
Does the expression (10 < 20 and 20 > 10) return True?
Both comparisons must be correct.
Write a Python function that takes two integers and returns a tuple of their sum, difference, product, and quotient.
Use basic arithmetic operators.
Create a program that asks for age and student status, and evaluates if a person is eligible for a specific discount using logical operators.
Combine your knowledge of input, logic, and comparison.
5 more questions in this section. Enroll free to practise them all.
Enroll free