Answer to Question #291228 in Python for H A

Question #291228

loops + if combined:

question 1: input 5 numbers and calculate the sum of all numbers?

I think I should use a list of the number

I want very simple code



1
Expert's answer
2022-01-27T07:47:05-0500
sum_n = 0
for i in range(5):
    sum_n += int(input('input number: '))
print('Sum of all numbers:', sum_n)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS