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
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started