Question

Design the logic for a program that allows a user to enter 10 numbers, then displays...

Design the logic for a program that allows a user to enter 10 numbers, then displays all of the numbers, the sum and average of the numbers. (Use array and loop.) the pseudocode in python please

0 0
Add a comment Improve this question Transcribed image text
Answer #1
  1. Start
  2. initialize an empty list to store numbers
  3. use a for loop to read numbers in the list
  4. calculate the sum of the list using sum() function or you can also use for loop
  5. calculate the average by dividing by 10
  6. use print commands to display result
nums = []
sums = 0
avg = 0
# read 10 numbers
for i in range(10):
    nums.append(int(input('Enter a number: ')))
# calculate sum and average
sums = sum(nums)
avg = sums / 10
# display results
print('Numbers you entered: ', nums)
print('Sum of all numbers:', sums)
print('Average of all numbers:', avg)

Add a comment
Know the answer?
Add Answer to:
Design the logic for a program that allows a user to enter 10 numbers, then displays...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT