Complete the code to check if both conditions are True using the AND operator.
result = (5 > 3) [1] (2 < 4) print(result)
The and operator returns True only if both conditions are True.
Complete the code to check if at least one condition is True using the OR operator.
result = (10 == 5) [1] (3 < 7) print(result)
The or operator returns True if at least one condition is True.
Fix the error in the code by completing the logical NOT operation.
value = True result = [1] value print(result)
The not operator reverses the boolean value.
Fill both blanks to create a condition that checks if x is between 10 and 20 (inclusive).
x = 15 if x [1] 10 [2] x <= 20: print("x is between 10 and 20")
Use >= to check if x is at least 10, and and to combine conditions.
Fill all three blanks to create a dictionary comprehension that includes words longer than 3 letters and converts keys to uppercase.
words = ['cat', 'house', 'dog', 'elephant'] result = [1]: [2] for word in words if len(word) [3] 3 print(result)
The dictionary keys are uppercase words, values are original words, and only words longer than 3 are included.