Answer to Question #281758 in Python for Abbas

Question #281758

Maria has 4 bags while going to airport, she has been told that she can take an average of 50kg.Tell her to input the weights of each bag and calculate the mean weight.

1
Expert's answer
2021-12-21T06:15:46-0500
num = int(input('How many bags: '))
total_sum = 0
for n in range(num):
    numbers = float(input('Enter the weights of bags in kg : '))
    total_sum += numbers
avg = total_sum/num
print(' Average weight is :', avg)

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