0

def divide(dividend, divisor):

This function should return the calculated value of integer division of divisor by dividend. Calculate the solution by using subtraction recursively to divide the two numbers. You are not allowed to use the division operator for this problem. Explanation: note that 7 divided by 2 is 3 because you can subtract like so: 7 – 2 = 5. 5 – 2 = 3. 3 – 2 = 1. 1 – 2 = -1 (so stop.) We were able to subtract 2 from our original 7 three times before reaching a negative number.

So far i have:

def divide(dividend, divisor):

n = dividend - divisor

while n > 0:

return

i know this must be easy im just not seeing it..