Question #40821

1. Given the following list:

count_list = [10, 20, 30, 40, 50, 60, 70, 80, 90]

Write a function in Python language to calculate the average of the numbers in the list above.

2. Write a function to remove duplicate integers from a given integer array of given length. Return a new array with result, do not modify the existing array. Also return the length of the result array.

count_list = [10, 20, 10, 30, 30, 40, 20, 50, 90, 60, 80, 70, 80, 90]
1

Expert's answer

2014-04-16T13:58:34-0400

http://www.AssignmentExpert.com

Answer on Question #40821 - Programming - Python

def average(count_list):
    return sum(count_list) / len(count_list)
def unique(count_list):
    unique_list = list(set(count_list))
    return [unique_list, len(unique_list)]
print(average([10, 20, 30, 40, 50, 60, 70, 80, 90]))
print(unique([10, 20, 10, 30, 30, 40, 20, 50, 90, 60, 80, 70, 80, 90]))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS