Question: 6. (10 points) Write a function count points that takes one parameter - a list of tuples, where each tuple is a pair of points
6. (10 points) Write a function count points that takes one parameter - a list of tuples, where each tuple is a pair of points (x, y). The return value should be the number of points in the input list that have x > y. points1 = [(0, 58), (52, 25), (23, 60), (11, 85), (43, 40), (22, 2)] print (count-points (points1)) # 3 points2 - [(49, 59), (21, 10), (6, 91), (37, 21), (19, 6), (94, 47)] print (count-points (points2)) # 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
