Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are an intern at a local animal sanctuary. One of your tasks is to record how many pounds of bamboo the pandas consume daily
You are an intern at a local animal sanctuary. One of your tasks is to record how many pounds of bamboo the pandas consume daily for 10 days. Write a program to calculate and print the average weight based on the data.
Before calculating the average, you decide to throw out the lowest and highest values.
Your program should do the following:
- declare and initialize the array with the recorded weights such as 43.1
- determine the maximum and minimum values in the array
- compute the average of the array contents, excluding the maximum and minimum values
- print the values in the array, excluding the maximum and minimum values
- print the average
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started