Professional Documents
Culture Documents
Primitive (P) Datastructure (D) Logical (L) : Python Question Bank
Primitive (P) Datastructure (D) Logical (L) : Python Question Bank
Primitive(P)
DataStructure(
D)
Logical(L) Question Description Answer Day 1
P Is Python case sensitive when dealing with identifiers? yes 1
P What is the maximum possible length of an identifier? none of the mentioned 1
P Which of the following is invalid? none of the mentioned 1
P Which of the following is an invalid variable? 1st_string 1
P Which of the following is not a keyword? eval 1
P What will be the output of the following
All keywords in Python are in _________ Python none of the mentioned 1
code snippet?
P Which of the following cannot be a variable? in
not(3>4) 1
P not(1&1) True False 1
What will be the output of the following Python
Which
P of the following Boolean expressions is not logically equivalent not(-6>10
to the other
or-6==10)
three? 2,2,2
What will be the code
outputsnippet?
of the following Python
P not(10<20) and not(10>30)
statement? false 1
P >>>"abcd"[2:] cd 1
What will be the output of the following Python
P What arithmetic operators cannot be used with strings?
statement? – 1
What will be the output of the following Python
P >>>print('new'
code? 'line') newline 2,1
P print(0xA + 0xB + 0xC) 33 1
P 1f s1.__contains__(s2) 1
P Which is the correct operator for power(x,y)? X**y 1
P What is the answer to this expression, 22 % 3 is? 1 1
P What is the output of this expression, 3*1**3? 3 1
P Which one of the following has the highest precedence in the expression?
Parentheses 1
P Which one of these is floor division? // 1
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
Day 2 Day 3 Day 4 Day 5 Day 6 Day 7 Day 14 Day 21 Day 28
2 2 2
1 2
2 2 2
2 2
2 2 2
1 1
1 1
1 1
1 2
1 1
1 1
1 1
1 1
1 1
1
1 1
1 1
1 1
1 1
1 1
1 1
1 1 1
1 1
1 1
1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1 1
1 1
1 1
1 1
1 1
1 1