Respuesta :
Answer:
Explanation:
I'm going to add a python program for this example, step by step:
- We declare 4 variables for our zoo, zoo quantity, and the average.
- We make the operation for the average where sum the zoo and divide with the quantity
- In the last step, we print the variable avg_owls.
num_owls_zoo1 = 1
num_owls_zoo2 = 2
num_owls_zoo3 = 3
num_owls_zoo4 = 4
zoos = 4
avg_owls = 0.0
avg_owls=(num_owls_zoo1+num_owls_zoo2+num_owls_zoo3+num_owls_zoo4)/zoos
print('Average owls per zoo:', int(avg_owls))
The average of a dataset is the sum of the dataset divided by the count of the data elements. The program in Python where comments are used for explanation is as follows:
#Get input for the number of zoo
n = int(input("Number of zoo: "))
#Initialize the total number of owls to 0
total = 0
#Iterate through n
for i in range(n):
#Get input for the number of owls in each zoo
owlperzoo = int(input("Owls: "))
#Calculate the total number of owls
total += owlperzoo
#Calculate the average number of owls (as an integer)
avg_owls = int(total/n)
#Print the calculated average
print("Average: ",avg_owls);
Read more about average programs at:
https://brainly.com/question/23920284