Python 3.7 List
Assignment 7 – Lists
List Operations: Write the following functions in Python which take a list as a input parameter and does the following:
· def range( number_list ):
# returns range of the list. Range is largest number in the list – the smallest number in the list.
· def sum( number_list ):
#returns the sum of the numbers in the list.
· def average( number_list ):
#returns mean or average. Use the sum (..) function(previous fn) to calculate the average.
· def median( number_list ):
#returns median of the list. Median is the middle number of the list after the list is sorted. If numbers are even, median is the average of the two middle numbers.
· def clip( number_list, clipNum ):
Within the main ask the user to enter a set of 10 numbers. The program should store the numbers in a list, call each of the functions provided above and display the return values within main() with meaningful messages as shown below:
Given List:
Range of the List is
Sum of the List is
Average of the List is
Median of the List is
Clipped List clipped on the number __ is:
(You can hard code the clipNum or ask it to be provided as a user input)
All functions should be in one file named ListFunctionsFirstname.py with your first name substituted and please submit as a zip file.