id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

scrabble_legal_rack_play


In this exercise (a continuation of the previous Scrabble exercise), you will write scrabble_legal_rack_play(row, k, word, rack) to return True if the given word fits in the row at position k, and can be made out of the letters in the player's rack of letters (plus the letters already on the board). Note that you must use at least one letter from the rack to make a play legal.


scrabble_legal_rack_play([1, 1, 1, 1, 'O', 1, 1, 1], 0, 'HELLO', 'EHLLORT') → True
scrabble_legal_rack_play([1, 'E', 1, 1, 'O', 1, 1, 1], 0, 'HELLO', 'EHLLORT') → True
scrabble_legal_rack_play([1, 'E', 1, 1, 'O', 1, 1, 1], 0, 'HELLO', 'EHLMORT') → False

...Save, Compile, Run (ctrl-enter)

def scrabble_legal_rack_play(row, k, word, rack):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 471 Post-solution available

Copyright Nick Parlante 2017 - privacy