Predict the output of the following code :
L1 = [100,900,300,400,500]
START = 1
SUM = 0
for C in range(START,4):
SUM = SUM + L1[C]
print(C, ".", SUM)
SUM = SUM + L1[0]*10
print(SUM)
Answers
Answered by
43
Answer:
your code is not clear...
but if the code is
L1 = [100,900,300,400,500]
START = 1
SUM = 0
for C in range(START,4):
SUM = SUM + L1[C]
print(C, ".", SUM)
SUM = SUM + L1[0]*10
print(SUM)
then the output is:
1 . 900
1900
2 . 2200
3200
3 . 3600
4600
otherwise if the code is :
L1 = [100,900,300,400,500]
START = 1
SUM = 0
for C in range(START,4):
SUM = SUM + L1[C]
print(C, ".", SUM)
SUM = SUM + L1[0]*10
print(SUM)
then the output is :
1 . 900
2 . 2200
3 . 3600
4600
#HOPE IT HELPS YOU
PLEASE MARK BRAINLIEST
Answered by
9
Answer:
Explanation:
SUM = SUM + L1[0]*10
print(SUM)
then the output is:
1 . 900
1900
2 . 2200
3200
3 . 3600
Similar questions
Math,
5 months ago
Hindi,
5 months ago
Math,
10 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago