Array Competencies

Array Competency Examples

For all the examples below, assume you have a filled array of integers called nums. You will just need to write the function for the exam. You can test your code using the Competency Template.

1. Find the average of all the scores that are more than 10 points below the high score and above the average score for the entire list.

2. Find the highest score that is both below the average score for the entire list and is odd.

3. Print the second highest odd score in the array

4. Print the average of all scores that are between the high score and the average score for the entire list

5. Print the highest odd score below the average score

We will talk about this type of problems more in class.. but you can see if you have an idea now:
6. Print the highest odd score that falls AFTER the highest score in the list

7. Print all the even scores that fall BEFORE the first score more than 10 points below the average score.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>