Question: def delete_row(grid, y): Given a grid , remove row y and add a new empty row at the top of the grid. ? Return value

def delete_row(grid, y): Given a grid, remove row y and add a new empty row at the top of the grid. ? Return value: This function should alter the grid passed in and should not return anything. ? Assumption: Same as get_row() for grid and y. ? Examples: in the following examples, assume g = [[None, "J"], [None, "J"], ["J", "J"]]

o # after this call, g will be [[None, None], [None, "J"], [None, "J"]]

delete_row(g,2) ?None # returns nothing, alters g

o # after this call, g will be [[None, None], [None, "J"], ["J", "J"]]

delete_row(g,1) ? None # returns nothing, alters g

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!