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

 

scrabble_best_play


In this fifth Scrabble exercise, you will define scrabble_best_play(row, rack) to return the highest scoring play that is possible with the given row and the given rack of letters. The result you return should be a list [score, k, word], where k is the position in row where word can be placed to yield 'score' points.


scrabble_best_play([-3, 1, 2, 1, '*', 1, 2, 1, -3], 'GLYZOOO') → [227, 2, 'ZOOLOGY']
scrabble_best_play([-3, 1, 2, 1, '*', 1, 2, 1, -3], 'ELTHRNO') → [60, 4, 'OTHER']
scrabble_best_play([-3, 1, 2, 1, 1, 'O', 2, 1, -3], 'ELTXRNO') → [60, 5, 'OXEN']

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

def scrabble_best_play(row, 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: 474 Post-solution available

Copyright Nick Parlante 2017 - privacy