Several of the programming exercises in this section ask you to find the mean and median value in a list. Recall that the mean is the arithmetic average and that that median is the middle value in an ordered list. When a list contains an odd number of values, the median is the value in the middle position. When a list contains an even number of values, the median is the mean of the values in the two middle positions. Chapter 2 described the remainder operator which you can use to determine whether a number is even or odd. When a number is divided by 2, the remainder is 0 if the number is even. Design an application that accepts 10 numbers and displays them in descending order.
Several of the programming exercises in this section ask you to find the mean and median value in a list. Recall that the mean is the arithmetic average and that that median is the middle value in an ordered list. When a list contains an odd number of values, the median is the value in the middle position. When a list contains an even number of values, the median is the mean of the values in the two middle positions. Chapter 2 described the remainder operator which you can use to determine whether a number is even or odd. When a number is divided by 2, the remainder is 0 if the number is even.
Design an application that accepts 10 numbers and displays them in descending order.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images