pausing the game displaysurf fill(bgcolor pygame mixer music stop( showtextscreen('paused'pause until key press pygame mixer music play(- lastfalltime time time( lastmovedowntime time time( lastmovesidewaystime time time( elif (event key =k_left or event key =k_a) movingleft false elif (event key =k_right or event key =k_d) movingright false elif (event key =k_down or event key =k_s) movingdown false elif event type =keydown moving the block sideways if (event key =k_left or event key =k_aand isvalidposition(boardfallingpieceadjx=- ) fallingpiece[' '- movingleft true movingright false lastmovesidewaystime time time( elif (event key =k_right or event key =k_dand isvalidposition(boardfallingpieceadjx= ) fallingpiece[' '+ movingright true movingleft false lastmovesidewaystime time time( rotating the block (if there is room to rotate elif (event key =k_up or event key =k_w) fallingpiece['rotation'(fallingpiece['rotation' len(shapes[fallingpiece['shape']] if not isvalidposition(boardfallingpiece) fallingpiece['rotation'(fallingpiece['rotation' len(shapes[fallingpiece['shape']] elif (event key =k_q)rotate the other direction fallingpiece['rotation'(fallingpiece['rotation' len(shapes[fallingpiece['shape']] if not isvalidposition(boardfallingpiece) fallingpiece['rotation'(fallingpiece['rotation' len(shapes[fallingpiece['shape']] making the block fall faster with the down key