avatar Bite 3. Word Values

Find the dictionary word with the highest value using Scrabble rules.

There are three tasks to complete for this Bite:

  • Finish the function load_words which creates and returns a list of words from a text file.
  • Finish the function calc_word_value which calculates and returns a word's Scrabble value.
  • Finish the function max_word_value which finds and returns the dictionary word with the highest score.

Notes:

  • The text of the dictionary is downloaded for you and is available with the path contained in the variable DICTIONARY.
  • The words in the file are separated by a newline character.
  • Letters not found in LETTER_SCORES score zero points.

Look at the TESTS tab to see what your code needs to pass. Enjoy!

Login and get coding
go back Intermediate level
Bitecoin 3X

1164 out of 1260 users completed this Bite.
Will you be Pythonista #1165 to crack this Bite?
Resolution time: ~50 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 3.83 on a 1-10 difficulty scale.
» You can do it! 😌

Focus on this Bite hiding sidebars, turn on Focus Mode.

Ask for Help