Question: Please use PYTHON only and follow all the following instructions carefully. Thank you Please make sure that it can pass all the test cases as

Please use PYTHON only and follow all the following instructions carefully. Thank you

Please use PYTHON only and follow all the following instructions carefully. ThankPlease make sure that it can pass all the test cases as follows: https://repl.it/LrAS/0

def count_odd_divisors (n): Given a positive int, find out how many odd numbers are divisors Assume: n is a positive integer o o Restrictions: no extra restrictions divisors: odd. count-odd-divisors(15) count-odd-divisors(8) count-odd-divisors (12) 4 1 2 1,3, 5,15. 4 # # divisors : 1,2,4,8. # are o 1 is odd. divisors: 1,2,3,4,6,12. 2 are odd. def inchworm(up, down, height): An inchworm is stuck in a well height feet deep. Starting at the bottom, it climbs up up inches, then slides down down inches. How many upwards climbs does it take for the inchworm to reach the top and escape? (hint: if the top is reached, we don't slide back down!) o Assume: up, down, and height are all non-negative int values o Restrictions: you must use a loop in your implementation to receive credit. o inchworm (2,1,10) inchworm(10,100,8) inchworm (8,6, 20) 1 o def count max(xs): Given a list of numbers, how many times does the largest value occur? If the list is empty, return zero o Assume: xs is a sequence of any length, and all values are numbers o Restrictions: remember, you may not call count(),max() or other related built-in functions o count_max([5,1,5,2,5,3,5]) o count max ([7,7,7,8]) count_max([]) 1 0 # largest is 5; it occurs 4 times. # largest is 8; it occurs once. # no max value; it occurs zero times. o

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!