(Solved) : Write Function Checkvertical Board Word Row Col Returns True Word Word Added Board Startin Q42715847 . . .

Write a function checkvertical(board, word, row, col), whichreturns True if the word word can be added to the board starting atposition board[row][col] and going down. The restrictions are (1)it has to fit entirely on the board, (2) it has to intersect andmatch with one or more non-blank letters on the board, and (3) itcannot change any letters on the board, other than blanks (that is,overlapping mismatches are not allowed).

My program isn’t working 🙁 Can anyone fix the program?

My program:

def checkvertical(board, word, row, col):

if len(word) > 20 – row:

return False

matchesoneletter = False

for k in range(len(word)):

wordletter = word[k]

boardletter = board[row + k][col]

if wordletter == boardletter:

matchesoneletter = True

if boardletter == blank:

continue

elif boardletter != wordletter:

return False

return matchesoneletter

Expert Answer


Answer to Write a function checkvertical(board, word, row, col), which returns True if the word word can be added to the board sta…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?