PROBLEM 3 (12 pts) – Number of distinct elements in a list Write a function which receives as input a list of numbers an
Posted: Wed Apr 27, 2022 3:37 pm
PROBLEM 3 (12 pts) – Number of distinct elements in a list Write a function which receives as input a list of numbers and returns as result the number of distinct values in the list (so if a value appears more than once in the list, it is counted only once). def numberOfDistinctValues (someList): Some examples: numberOfDistinctValues ([8,12,4,3,5,8,5]) --> 5 numberOfDistinctValues ([7,3,9,3,0,7,3]) --> 4