PROBLEM 3 (12 pts) – Number of distinct elements in a list Write a function which receives as input a list of numbers an

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

PROBLEM 3 (12 pts) – Number of distinct elements in a list Write a function which receives as input a list of numbers an

Post by answerhappygod »

Problem 3 12 Pts Number Of Distinct Elements In A List Write A Function Which Receives As Input A List Of Numbers An 1
Problem 3 12 Pts Number Of Distinct Elements In A List Write A Function Which Receives As Input A List Of Numbers An 1 (32.38 KiB) Viewed 26 times
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply