Westonci.ca makes finding answers easy, with a community of experts ready to provide you with the information you seek. Get the answers you need quickly and accurately from a dedicated community of experts on our Q&A platform. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform.
Sagot :
Answer:
The program in Python is as follows:
n = int(input())
sum = 0
for i in range(n):
num= float(input())
sum+=num
print("Average: ",sum/n)
Explanation:
Required
Average of numbers
The explanation is as follows:
This prompts the user for the count of numbers, n
n = int(input())
Initialize sum to 0
sum = 0
Iterate through n
for i in range(n):
This gets input for each number
num= float(input())
This calculates the sum of all inputs
sum+=num
This calculates and prints the average of all inputs
print("Average: ",sum/n)
Thank you for your visit. We're committed to providing you with the best information available. Return anytime for more. Thanks for using our service. We're always here to provide accurate and up-to-date answers to all your queries. Thank you for trusting Westonci.ca. Don't forget to revisit us for more accurate and insightful answers.