Discover the best answers at Westonci.ca, where experts share their insights and knowledge with you. Discover in-depth answers to your questions from a wide network of experts on our user-friendly Q&A platform. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.
Sagot :
Answer:
avg_owls=0.0
num_owls_zooA = int(input())
num_owls_zooB = int(input())
num_owls_zooC = int(input())
num_zoos = 3
avg_owls = (num_owls_zooA + num_owls_zooB + num_owls_zooC) / num_zoos
print('Average owls per zoo:', int(avg_owls))
Explanation:
There is a problem while you are trying the calculate the average owls per zoo.
As you may know, in order to calculate the average, you need to get the total number of owls in all the zoos, then divide it to the number of zoos. That is why you need to sum num_owls_zooA + num_owls_zooB + num_owls_zooC and divide the result by num_zoos
Be aware that the average is printed as integer value. That is why you need to cast the avg_owls to an int as int(avg_owls)
We hope our answers were helpful. Return anytime for more information and answers to any other questions you may have. We hope our answers were useful. Return anytime for more information and answers to any other questions you have. Keep exploring Westonci.ca for more insightful answers to your questions. We're here to help.