In Python, what does the expression 9 - 3 evaluate to?
6
If you have 14 * 2 in Python, what will be the result?
28
How does Python evaluate 15 // 2?
7
What will 17 % 5 return in Python?
2
What does the ** operator calculate in 2 ** 3?
8
In Python, what is the result of 5 + 3 * 2?
11
What is the result of 8 % 3?
2
In Python, how is 9 + 4 - 2 evaluated?
11
What does the expression 10 / 5 / 2 return?
1
If you perform 11 // 3 in Python, what will be the result?
3
What will be the result of 7 ** 2 in Python?
49
Which operator checks if two values are equal?
==
What does the != operator do?
Checks if two values are not equal
Which operator is used to check if the left operand is greater than the right operand?
>
What does the <= operator signify?
Less than or equal to
Which operator checks if the left operand is less than the right operand?
<
What is the result of 5 == 5?
TRUE
How does Python evaluate 8 != 8?
FALSE
What will 10 > 5 return?
TRUE
Is 3 < 4 a true statement?
TRUE
What does 7 >= 8 evaluate to?
FALSE
What is the outcome of 9 <= 9?
TRUE
How does Python evaluate 15 < 10?
FALSE
What will be the result of 12 >= 12?
TRUE
What is the result of 20 == 10 + 10?
TRUE
How does Python evaluate 18 != 3 * 6?
FALSE
Which term describes a Boolean operator that gives a True result only when both of its conditions are True?
AND
What is meant by the Boolean operator OR?
It gives a True result if either one of the conditions is True
Which term describes a Boolean operator that reverses the value of an expression, so True becomes False and False becomes True?
NOT
What is meant by a Boolean expression?
An expression that evaluates to either True or False
Which term describes a table that shows the output for every possible combination of inputs to a Boolean expression?
Truth table
What is meant by a Boolean operator?
An operator that combines or reverses conditions in a Boolean expression
What is the result of True OR False?
True
A program has the condition if not (score >= 50): print('Retry'). For which score does the program print Retry?
40
What is the result of not false?
True
A program allows entry when age >= 18 AND hasTicket is True. Which set of values allows entry?
Age is 18, hasTicket is True
Which logical operator gives a True result when at least one of the two conditions is True?
OR
What is the result of False AND True?
False
In a program, the condition not (temp < 0) and not (temp > 40) controls whether Safe is displayed. For which temperature is Safe displayed?
25
In the truth table for the expression A AND B, how many of the rows have an output of True?
1
A shop gives free delivery when the order total is 50 or more, or when the customer is a member. Which condition matches this rule?
total >= 50 or member == True
A game unlocks a bonus level only when the player has collected all the coins and the timer is above 30. The program uses the condition hasAllCoins or timer > 30. What is wrong with this condition?
It unlocks the level when only one of the two things is true
We use cookies to enhance your experience. You can manage your preferences or learn more in our Cookie Policy.