done because this code will move the piece to the absolute bottom and begin falling the next pieceand we don' want to surprise the player by having those pieces immediately start moving just because they were holding down an arrow key when they hit the space key to find the farthest that the piece can fallwe should first call isvalidposition(and pass the integer for the adjy parameter if isvalidposition(returns falsewe know that the piece cannot fall any further and is already at the bottom if isvalidposition(returns truethen we know that it can fall space down in that casewe should call isvalidposition(with adjy set to if it returns true againwe will call isvalidposition(with adjy set to and so on this is what the for loop on line handlescalling isvalidposition(with increasing integer values to pass for adjy until the function call returns false at that pointwe know that the value in is one space more past the bottom this is why line increases fallingpiece[' 'by instead of (also note that the second parameter to range(on line ' for statement is set to boardheight because this is the maximum amount that the piece could fall before it must hit the bottom of the board moving by holding down the key handle moving the block because of user input if (movingleft or movingrightand time time(lastmovesidewaystime movesidewaysfreq if movingleft and isvalidposition(boardfallingpieceadjx= ) fallingpiece[' '- elif movingright and isvalidposition(boardfallingpieceadjx= ) fallingpiece[' '+ lastmovesidewaystime time time(remember that on line the movingleft variable was set to true if the player pressed down on the left arrow key(the same for line where movingright was set to true if the player pressed down on the right arrow key the moving variables were set back to false if the user let up on these keys also (see line and what also happened when the player pressed down on the left or right arrow key was that the lastmovesidewaystime variable was set to the current time (which was the return value of time time()if the player continued to hold down the arrow key without letting up on itthen the movingleft or movingright variable would still be set to true