You are on page 1of 2

Sr

A B C D Ans
No Question
1 Which is the correct operator for power(xy)? x^y x**y x^^y x*y B
2 Which one of these is floor division? / // \ % B
7 1 0 5 B
3 What is the answer to this expression, 22 % 3 is?
Mathematical operations can be performed on a
TRUE FALSE B
4 string.
The expression Int(x) implies that the variable x
TRUE FALSE A
5 is converted to an integer
6 What is the output of print(2%6) Value Error 0.33 2 1 C
7 What is the output of print(5 is 5) TRUE FALSE error A
8 What is the output of print(1 in L1) L1=[1,2,3] 1 TRUE FALSE name error D
9 The range() function by default returns a ___ tuple string dictionary list D
10 What is the output of list(range(10)) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] [ 1, 2, 3, 4, 5, 6, 7, 8, 9,10] [(1, 2, 3, 4, 5, 6, 7, 8, 9,10) (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) A
11 Is for loop possible without range() in Python yes no maybe A
Which one of the following has the same Multiplication, Division and Multiplication, Division, Addition
Addition and Subtraction
Addition and Subtraction
Addition and Multiplication A
12 precedence level?
Which operator is used to calculate the power of
* ** / // B
13 any number?
Which operators are used are used to compare
Arithmetic Logical Relational Assignment C
14 the value of two operands.

Which operator is used to compare two operands and or not nor A


15 and return true if both the operands are true.
The ______ operators perform bit by bit
Arithmetic Logical Bitwise Relational C
16 operation on the value of two operands.
& << ^ * D
17 Which of the following is not a bitwise operator?
18 Which of the following is not a Logical operator and or not nor D
The ____ operator is used to compare memory location of
Logical Membership Identity Comparison C
19 two objects.
20 If a=3 then what is the output of ~a 12 -12 4 -4 D
Which operator is used to test whether a value or variable
Logical Membership Identity Comparison B
21 is found in a sequence?
In python, the body of the if statement is indicated by the
{} () [ ] : D
22 ___________
What does the following code print?

if 4 + 5 == 10: TRUE
TRUE FALSE
print("TRUE") TRUE FALSE C
FALSE TRUE
else: TRUE
print("FALSE")
23 print("TRUE")
What is the output of the following if statement

a, b = 12, 5
TRUE FALSE
if a + b: TRUE FALSE A
FALSE TRUE
print('True')
else:
24 print('False')
Which of the following is not used as while loop for loop do.. while loop for and do...while loop C
25 loop in Python?
Keyword "break" can be used to Keyword "continue" is used to
Loops should be ended with No loop can be used to iterate
bring control out of the current continue with the remaining C
keyword "end". through the elements of strings.
26 Which of the following is True regarding loops in Python? loop. statements inside the loop.
How many times will the loop run?

i=2
0 1 2 3 C
while(i>0):

27 i=i-1

28 Which one of the following is a valid Python if statement : if a>=2 : if (a >= 2) if (a => 22) if a >= 22 A
What keyword would you use to add an alternative
elseif else if elif if C
29 condition to an if statement?
Dictates what happens before
Defines program-specific data Directs the order of execution of
the program starts and after it None of the above B
structures the statements in the program
30 In a Python program, a control structure: terminates
31 Which statement will check if a is equal to b? if a = b: if a == b: if a === c: if a == b B
Python has switch statement but
32 Does python have switch case statement? TRUE FALSE None of the above B
we can not use it.
What does the following print?
x = 10 / 4
y = 5 / 2.0 4 5 4.5 7 B
print (x + y)
33
Whatis the output of
34 for x in range(5): 0 1 2 3 4 5 0 1 2 3 4 1 2 3 4 5 1 2 3 4 B
print(x)
what is the iutput of for
x in range(0,8,2): 0 1 2 3 4 5 0 1 2 3 4 0 2 4 6 0 2 4 6 8 C
35 print(x)
36 What does continue statement do? skip print stop repeat A
Which of the following is not a valid flow control
exit() break continue return A
37 statement?
38 0 1 inffinite error A
for i in range(-3), how many times this loop will run ?
0 1 2 3 D
39 for i in [1,2,3]:, how many times a loop run ?
40 range iteration both none C
for loop in python are work on
41 For loop in python is ____ Entry control Exit control simple loop none A

42 How many times it will print the statement ?, for i in 0 99 100 101 B
range(100): print(i)
l=[]
for i in l:
[ ] list print() none D
print(l)
43 what is the output?
for i in range(4):
break
44 0 1 2 3 A
print(l)
what is the output?
continue break exit return B
45 To break the infinite loop , which keyword we use ?

46 Which of the following loop is work on the particular range for while do while recursion A
in python ?
0 1 2 infinite A
47 While(0), how many times a loop run ?

You might also like