Operators, expressions and precedence Theory part 1
What We'll Learn
A quick overview of today's lecture
Operators, expressions and precedence Theory part 1
Concept ID: XI_U2_OPERATORS_EXPRESSIONS_PRECEDENCE.
Primary Sub-subtopic: Operators, expressions and precedence.
Question-bank grouping: Python Basics and Data Concepts.
Use this lecture for theory, examples, misconceptions, and short PYQ checks mapped to this concept ID.
Key things we'll cover
Operators, expressions and precedence
PYQ references used by all prompt types19 included0 excluded
Flagged questions are excluded from Study Notes, PPT, and Student Notes references until corrected in Paper Analyzer.
Included
ID 1068 · 2025 · 1 mark(s)
The output of 1 or 0 and 1 is:
a) True
b) False
c) 0
d) 1
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1071 · 2025 · 1 mark(s)
"Hello" <= "hello" gives output as:
a) True
b) False
c) Hello
d) "hello"
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1079 · 2025 · 1 mark(s)
Which of these is a logical operator:
a) ==
b) >=
c) or
d) !=
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1110 · 2025 · 1 mark(s)
What will be the output of the following statement:
print(4+2**3**2-5//11%3)
a) 66
b) 46
c) 516
d) 494
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1157 · 2025 · 1 mark(s)
A , B = 8.6 , 2
print(A//B)
a) 4.3
b) 4.0
c) 4
d) Compilation error
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1194 · 2025 · 1 mark(s)
An input function always returns a value of ___________ type.
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1197 · 2025 · 1 mark(s)
What will be the value of y after following code fragment is executed?
x=10.0
y=(x<100.0)and x>=10
(a)110
(b)True
(c)False
(d)Error
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1229 · 2025 · 1 mark(s)
Identify the valid relational operator(s) in Python from the following:
(A) =
(B) <
(C) <>
(D) not
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1230 · 2025 · 1 mark(s)
What will the following expression be evaluated to in Python?
print(15.0 / 4 + (8 + 3.0))
(a) 14.75
(b) 14.0
(c) 15
(d) 15.5
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1232 · 2025 · 1 mark(s)
Which of the following is an invalid statement?
a. a=b=c=2
b. a,b,c=10,20,30
c. a b c=20,30,40
d. a_b_c=20
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1293 · 2025 · 1 mark(s)
What will be the output of the following statement?
print(16+15/4**2//15+8)
(A) –24.0
(B) 24.0
(C) 24
(D) –24
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1335 · 2025 · 1 mark(s)
What will be the output of the following statement?
print (14 % 3**2*4)
A) 16
B) 64
C) 20
D) 256
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1341 · 2025 · 1 mark(s)
Which of the following operators evaluates to True if the variable on either side of the operator points towards the same memory location and False otherwise?
A) is
B) is not
C) and
D) or
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1376 · 2025 · 1 mark(s)
State whether the following statement is True or False?
Python uses indentation to define blocks of code.
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1385 · 2025 · 1 mark(s)
What will be the output of the following expression?
print(2 ** 3 ** 2)
(a) 64
(b) 512
(c) 36
(d) 256
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1390 · 2025 · 1 mark(s)
Select the correct output of the following code.
str1 = "Digital India"
print(str1[2:8])
(a) igital I
(b) gital
(c) gital In
(d) igital
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1396 · 2025 · 1 mark(s)
Assertion (A): A variable in Python must be declared before use. [1]
Reasoning (R): Python is a dynamically typed language.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1429 · 2025 · 1 mark(s)
What will be the output of the following expression?
>>16 - 3 * 4 + 9 -2
(a) 59
(b) –25
(c) 11
(d) 143
Python Basics and Data Concepts → Operators, expressions and precedence
Included
ID 1438 · 2025 · 1 mark(s)
Observe the following code and select the correct output.
tup_val = (7, 9, 15, [41, 53])
tup_val[3][0] = 65
print(tup_val)
(a) (7, 9, 15, [41, 53])
(b) (7, 9, 15, (65, 53))
(c) (7, 9, 15, [65, 53])
(d) Error
Python Basics and Data Concepts → Operators, expressions and precedence