Please use python with executed tests

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: 899603
Joined: Mon Aug 02, 2021 8:13 am

Please use python with executed tests

Post by answerhappygod »

Please use python with executed tests
Please Use Python With Executed Tests 1
Please Use Python With Executed Tests 1 (127.46 KiB) Viewed 18 times
1. Counting Biggest Value. A list can contain values of any type, even lists. For example, consider ex = [[2, 4], [5], [3, 5, 5, 2], [5, 1]]. Here ex is a list. Each item in ex is a List[int]. So ex is a List[List[int]]. Write a function count_biggest (lol). It takes a List[List[int]], and returns an int indicating how many times the largest number in 101 appears. For example, in ex, the largest value is 5, and it appears 4 times, so count_biggest (ex) ⇒ 4. You may assume that 101 contains at least one list, and that each list in 101 is not empty. Include these in your requirements. (For extra challenge, try to write your solution so it only requires that at least one list in 101 is not empty. For example, count_biggest([[], [], [-3, -2], [-2, -2]]) → 3, because -2 is the largest value, and it appears 3 times.) Exercise
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply