human
Program for quotient and remainder of big number | Function to calculate the modulus.
Store the modulus of big number.
Do step by step division.
Update modulo by concatenating current digit ..
Update quotient.
Update mod for next iteration ..
Flag used to remove starting zeros.
Driver Code"
How can the above be solved in Python?
 What is a code to program for quotient and remainder of big number and the other steps required?
assistant
#Here is code to program for quotient and remainder of big number and the other steps required.
 def modBigNumber ( num , m ) :
	vec = [ ]
	mod = 0
	for i in range ( 0 , len ( num ) , 1 ) :
		digit = ord ( num [ i ] ) - ord ( '0' )
		mod = mod * 10 + digit
		quo = int ( mod / m )
		vec . append ( quo )
		mod = mod % m
	print ( " Remainder ▁ : " , mod )
	print ( " Quotient ▁ : " , end = " ▁ " )
	zeroflag = 0 ;
	for i in range ( 0 , len ( vec ) , 1 ) :
		if ( vec [ i ] == 0 and zeroflag == 0 ) :
			continue
		zeroflag = 1
		print ( vec [ i ] , end = " " )
	return
if __name__ == ' _ _ main _ _ ' :
	num = "14598499948265358486"
	m = 487
	modBigNumber ( num , m )