Computer Science, asked by Advitiya1241, 3 months ago

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 vijayakumarchinthala
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