Question: put this into python def smallest_above_after_div(original, smallest, divisor): Find the smallest number above smallest you can get by repeatedly dividing original by divisor. For example:
put this into python

def smallest_above_after_div(original, smallest, divisor): Find the smallest number above smallest you can get by repeatedly dividing original by divisor. For example: the smallest number above 100 you can get by dividing 500 repeatedly by 2 is 12:5 Start with 500, divide by 2 and get 250, divide by 2 and get 125, divide by 2 and get 62.5. 62.5 is too small, so 125 is the smallest above 100. the smallest number above 5 you can get by dividing 125 repeatedly by 2 is 7.8125 Start with 125, divide by 2 and get 62.5, then 31.25, then 15.625, then 7.8125, then 3.90625-too small, 7.8125 is the smallest the smallest number above 10 you can get by dividing 1000 repeatedly by 10 is 100 1000, 100, 10-too small, 100 is the smallest Return value: a number (see above) Assumptions: o o o original and smallest will be positive numbers above 0 divisor will be a positive number above 1 original will be greater than smallest .Notes: Hint: Keep track of the last smallest value you computed that was valid (and don't lose that number when computing the next number). o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
