Hiranandani Foundation School International
2024-2025
SUBJECT: Computing UNIT NAME- Computational GRADE– VII 14 Nov,2024
thinking- Python -logical test
STUDENT`S NAME: DIV: Worksheet No.- 16
1 | Page
1. What is the output of the following code?
x = 10
y = 20
print(x != y)
a) True
b) False
c) 10
d) 20
2. Which operator is used to check if two values are equal?
a) =
b) ==
c) !=
d) <>
3. Which operator is used to check if a value is not equal to another value?
a) >
b) >=
c) <=
d) !=
4. What will be the output of this code?
a = 10
b=3
result = a // b * 2
print(result)
A) 6
B) 7
C) 20
D) Error
5. What is the error in this code?
x = 10
y=5
if x = y:
print("x is equal to y")
A) SyntaxError: invalid syntax
B) TypeError: cannot compare integers
C) ValueError: invalid assignment
D) SyntaxError: invalid comparison operator
2 | Page