Code snippet:
a=[13,56,17]
a.append([87])
a.extend([45,67])
print(a)
๐1
What will be the output of the code?
Anonymous Quiz
28%
[13, 56, 17, [87], 45, 67]
27%
[13, 56, 17, 87, 45, 67]
21%
[13, 56, 17, 87, [45, 67]]
24%
[13, 56, 17, [87], [45, 67]]
When a value is truncated to 3 decimal places, which of the following is true?
Anonymous Quiz
15%
Both positive and negative numbers are rounded down.
31%
Positive numbers are rounded down and negative numbers are rounded up.
31%
Positive numbers are rounded up and negative numbers are rounded down.
22%
Both positive and negative numbers are rounded up.
Code snippet:
A = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
[A[i][i] for i in range(len(A))]
What will be the output of the code?
Anonymous Quiz
65%
[1, 5, 9]
16%
[3, 5, 7]
8%
[4, 5, 6]
12%
[2, 5, 8]
What will be the output of the code?
Anonymous Quiz
29%
__str__ called
24%
__repr__ called
19%
Error
28%
Nothing is printed
What will be the output of the Python code?
Anonymous Quiz
25%
0 1 2
39%
0 1 2 0 1 2 0 1 2 โฆ
24%
None None None
12%
None of the mentioned
What will be the output of the Python code?
Anonymous Quiz
10%
6
12%
12
50%
24
19%
Error
9%
None of the mentioned
๐1