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.
What is the output of x = 5, y = 2; print(x + y)?
Think basic addition.
What does the expression z = 15 % 4 evaluate to?
Consider how many times 4 fits into 15.
What does the + operator do in Python?
Consider the basic math operation.
True or False: The expression (5 == 5) is true.
Think about how equality works in math.
Design a Python script that accepts two numbers and prints the result of each arithmetic operator (addition, subtraction, multiplication, division) applied to those numbers.
Use the relevant arithmetic operators.
Write a program that initializes two variables a = 10, b = 25. Using all comparison operators, print out Boolean results for each comparison.
Check how each operator works with the given variables.
5 more questions in this section. Enroll free to practise them all.
Enroll free