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
sum_n = 0
for i in range(5):
sum_n += int(input('input number: '))
print('Sum of all numbers:', sum_n)
Comments
Leave a comment