44.
2 points
What will the output after the following statements?
x= []
for i in range(10):
x.append(i**2)
print(x)
O (a) [0, 1, 2, 3, 4, 5]
O (b) [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
O
(c)[0, 1, 4, 9, 16, 25, 36, 49, 64, 81,
100]
*O (d) [1, 4, 9, 16, 25, 36, 49, 64, 81]
Answers
Answered by
0
The output will be [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
Explanation:
The loop appends squares from 0-9 to the list x
Similar questions