Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Euclidean division in python

def long_division(dividend,divisor,times = 0):
	if(dividend - (divisor * times) < divisor ):
    	return dividend - (divisor * times)
	else:
    	return  long_division(dividend,divisor,times + 1)

print(long_division(100,6)) # >> 4
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Euclidean #division #python
ADD COMMENT
Topic
Name
9+7 =