Only approved questions will enter the prompt. Questions repeated across selected lectures are automatically de-duplicated in the final prompt.
IncludedL48: Operators, expressions and precedence Theory part 12025 · 1 mark(s)
The output of 1 or 0 and 1 is:
a) True
b) False
c) 0
d) 1
IncludedL48: Operators, expressions and precedence Theory part 12025 · 1 mark(s)
"Hello" <= "hello" gives output as:
a) True
b) False
c) Hello
d) "hello"
IncludedL48: Operators, expressions and precedence Theory part 12025 · 1 mark(s)
Which of these is a logical operator:
a) ==
b) >=
c) or
d) !=
IncludedL48: Operators, expressions and precedence Theory part 12025 · 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
IncludedL48: Operators, expressions and precedence Theory part 12025 · 1 mark(s)
A , B = 8.6 , 2
print(A//B)
a) 4.3
b) 4.0
c) 4
d) Compilation error
IncludedL48: Operators, expressions and precedence Theory part 12025 · 1 mark(s)
An input function always returns a value of ___________ type.
IncludedL48: Operators, expressions and precedence Theory part 12025 · 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
IncludedL48: Operators, expressions and precedence Theory part 12025 · 1 mark(s)
Identify the valid relational operator(s) in Python from the following:
(A) =
(B) <
(C) <>
(D) not
IncludedL48: Operators, expressions and precedence Theory part 12025 · 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
IncludedL48: Operators, expressions and precedence Theory part 12025 · 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
IncludedL48: Operators, expressions and precedence Theory part 12025 · 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
IncludedL48: Operators, expressions and precedence Theory part 12025 · 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
IncludedL48: Operators, expressions and precedence Theory part 12025 · 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
IncludedL48: Operators, expressions and precedence Theory part 12025 · 1 mark(s)
State whether the following statement is True or False?
Python uses indentation to define blocks of code.
IncludedL48: Operators, expressions and precedence Theory part 12025 · 1 mark(s)
What will be the output of the following expression?
print(2 ** 3 ** 2)
(a) 64
(b) 512
(c) 36
(d) 256
IncludedL48: Operators, expressions and precedence Theory part 12025 · 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
IncludedL48: Operators, expressions and precedence Theory part 12025 · 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.
IncludedL48: Operators, expressions and precedence Theory part 12025 · 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
IncludedL48: Operators, expressions and precedence Theory part 12025 · 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
Reset All Progress?
This will clear all Done and Missed marks and rebuild the schedule from scratch.
A backup will be created automatically before resetting. You can restore it from the Backups page.