Practice Problem about arrays for Computer Science

Practice Problem about arrays for Computer Science

5-5 Practice Problems: Arrays

Using the scenario below, answer the following questions:

  • click here for more information on this paper

You are preparing for the Boston Marathon. In order to prepare, you need to train for 10 weeks, running an increasing number of miles per week, starting at running at least 2 miles your first week up to 26 miles by week 10.

1.) Initialize the array with the appropriate number of values.

2.) What is the value in the array element when the index contains 2?

3.) What is your list length?

  • click here for more information on this paper

4.) Calculate the sum of the total miles you spent running over the 10 weeks. Calculate the average number of miles you ran.

5.) Write a search to determine whether 4 is on your list.

"Looking for a Similar Assignment? Order now and Get a Discount!

Place New Order
It's Free, Fast & Safe

"Looking for a Similar Assignment? Order now and Get a Discount!

Hey, wait!You Don't want to miss this offer!

Before you go, let us offer you a 20% discount coupon for your next purchase.