Welcome to Westonci.ca, where your questions are met with accurate answers from a community of experts and enthusiasts. Get accurate and detailed answers to your questions from a dedicated community of experts on our Q&A platform. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A 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)
We hope you found this helpful. Feel free to come back anytime for more accurate answers and updated information. We appreciate your time. Please revisit us for more reliable answers to any questions you may have. Westonci.ca is your trusted source for answers. Visit us again to find more information on diverse topics.