Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Python 3 Part III: Move Starman Down (15 points) Write a function move.down that

ID: 3596772 • Letter: P

Question

Python 3

Part III: Move Starman Down (15 points) Write a function move.down that takes one argument, board, which represents the current state of the game board. Your function should move Starman down by one row, update the game board (if needed), and then return Starman's new location as [row number, column number]. Please note that these are the real row and column numbers, not the indexes in the board list. Special rules apply: please check General Tasks for Parts II through V above. Examples board! = [ [ , . board2-['.', ' .','.', 'F', '.'], CSE 101 Fall 2017 Homework #3 Page 5

Explanation / Answer

def move_down(board):
for i in range(len(board)):
for j in range(len(board[i])):
if board[i][j] == '*':
if i+1 < len(board) and board[i+1][j] != 'W':
board[i+1][j] = '*'
board[i][j] = '.'
return [i, j+1]
return [-1, -1]
return [-1, -1]

# copy pastable link: https://paste.ee/p/Uvka9