15.What will be the output of the following code fragment:
sum=0
for x in range(20, 30, 2):
print(x)
sum= sum + x
print(sum)
Answers
Answered by
0
Answer:
Expecting print(sum) is outside for loop.
20
22
24
26
28
120
Explanation:
All the values are added to the variable sum
Similar questions
Biology,
1 month ago
Math,
3 months ago
Sociology,
3 months ago
Computer Science,
9 months ago
Math,
9 months ago