Question: Problem Description and Given Info Write ( define ) a function named count _ divisible _ by , that takes two arguments and returns an

Problem Description and Given Info
Write (define) a function named count_divisible_by, that takes two arguments and returns an int value. You can safely assume that both arguments will always be positive integers. When this function is called, it should count all of the values between 1 and 100(inclusive) that are evenly divisible by either of the two argument values. Your function should return this count
Examples:
count_divisible_by(9,13) will return 18 because there are 18 numbers between 1 and 100 that are evenly divisible by either 9 or 13. count_divisible_by(3,5) will return 47 because there are 47 numbers between 1 and 100 that are evenly divisible by either 3 or 5. count_divisible_by(10,20) will return 10 because there are no numbers between 1 and 100 that are evenly divisible by either 10 or 20.
You may wish to write some additional code to test your function. Please be sure that you delete (or comment out) any test code before you submit your solution. The only code in your solution when you submit should be the required function definition.

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 Programming Questions!