human
Multiplication on Array : Range update query in O ( 1 ) | Creates a mul [ ] array for A [ ] and returns it after filling initial values ..
Does range update.
Prints updated Array.
Driver code.
.
Array to be updated.
Create and fill mul and div Array"
Solution in Python:

=====
Write me a code to multiplication on Array : Range update query in O ( 1 ) and the other steps required?
assistant
#Here is code to multiplication on Array : Range update query in O ( 1 ) and the other steps required.
 def initialize ( mul , div , size ) :
	for i in range ( 1 , size ) :
		mul [ i ] = ( mul [ i ] * mul [ i - 1 ] ) / div [ i ] ;
def update ( l , r , x , mul , div ) :
	mul [ l ] *= x ;
	div [ r + 1 ] *= x ;
def printArray ( ar , mul , div , n ) :
	for i in range ( n ) :
		ar [ i ] = ar [ i ] * mul [ i ] ;
		print ( int ( ar [ i ] ) , end = " ▁ " ) ;
if __name__ == ' _ _ main _ _ ' :
	ar = [ 10 , 5 , 20 , 40 ] ;
	n = len ( ar ) ;
	mul = [ 0 ] * ( n + 1 ) ;
	div = [ 0 ] * ( n + 1 ) ;
	for i in range ( n + 1 ) :
		mul [ i ] = div [ i ] = 1 ;
	update ( 0 , 1 , 10 , mul , div ) ;
	update ( 1 , 3 , 20 , mul , div ) ;
	update ( 2 , 2 , 2 , mul , div ) ;
	initialize ( mul , div , n + 1 ) ;
	printArray ( ar , mul , div , n ) ;