Question: PYTHON LANGUAGE Part 2 Write a function that places a piece at a coordinate on the board. It will take four arguments: the board (your

PYTHON LANGUAGE

 PYTHON LANGUAGE Part 2 Write a function that places a "piece"

Part 2 Write a function that places a "piece" at a coordinate on the board. It will take four arguments: the board (your board as a list), the row position (an integer), the column position (integer), and the piece (a string). For example, to change the upper-right hand corner to an "x", you would call: placePiece(board, 0, 2, "x") After which, printBoard(board) should produce: Remember that if you call placePiece() with a list as the first argument, and your placePiece()-function changes the list inside the function, the original list will also change, as discussed in lecture. So you don't have to return a value in placePiece) - just change the list directly given in the first argument, and "place" the piece in the given coordinates

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!