WorksheetsZeroToMastery
Total questions: 20
Worksheet time: 7mins
What will be output of given code?
[4, 6, 7]
[2, 6, 0]
[2, 5, 4]
[7, 1, 0]
Which method is used to add element to the end of the list?
add()
len()
push()
append()
Which of the following is immutable data structure?
Set
Tuple
List
Dictionary
What will be the output of 5//2 in python?
2.0
2.5
2
SyntaxError
Choose the correct output.
11
10
12
1
What will be the output of 3**4 in python?
12
0
81
SyntaxError
Choose the correct output
10001000
2000
True
False
Which data structure doesn't allow duplicated elements?
Set
Tuple
List
Dictionary
What will be the output of the following code snippet?
0
1
3
9
Which is the symbol of XOR ?
^
&
|
~
What will be the output?
TypeError
[2, 2, 3]
(2, 2, 3)
[1, 0, 3]
Method used to remove the item at given index
insert()
remove()
index()
pop()
Choose the correct output.
0 1 2 3 4 ........... 19
1 2 3 5 6 7 9 ....... 21
0 4 8 12 16 20
Error
Which of the following type of loop is not supported in Python?
for
while
do - while
None of the above
Choose the correct output.
[2, 5, 4, 6, 3, 4, 1, 0]
[0, 1, 4, 3, 6, 4, 5, 2]
[0, 1, 3, 7, 6, 5, 2]
[2, 5, 6, 7, 3, 1, 0]
Choose the correct output.
[2, 4, 6, 0]
[5, 7, 1]
[0, 1, 2, 4, 5, 6, 7]
[0, 1, 7, 6, 4, 5, 2]
Choose the correct output.
['hello world']
['hello', 'world']
['h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd']
['hello'],['world']
Choose the correct output.
False
HELLO WORLD
True
HelloWorld
Choose the correct output.
{1, 2, 3, 4, 5, 6}
{2, 4}
{1, 2, 2, 3, 4, 4, 5, 6}
{1, 3, 5, 6}
Which of the following is an invalid escape sequences in Python?
\t
\n
\\
None of the above
