Code Challenge 01 - Word Values Part I

Posted by PyBites on Mon 09 January 2017 in Challenges • 2 min read

Welcome to PyBites Code Challenges

Starting today every Monday we release a code challenge here on our blog. On Friday we publish one or more solutions.

The goal is to have us and our readers work on the solution during the week.

To keep it simple we don't accept pull-requests at this time. Just fork our repo and work on your solution locally.

To have the tests pass import the right module, do this when you have a local clone of the fork:

$ cd <challenge_number> (this week = 01)
$ cp name-template name.py
# code ...

If you want to share your solution just share your commit link in the comments of our Friday review post. (Monday post = questions / Friday post = solutions + reflection).

Check this link how to keep your fork in sync with our repo.

Remember, we don't strive for the 'best' solution, it's not a competition. We do of course strive to have good Pythonic solutions so any feedback is welcome, but do respect the newby / learner. Again, learning more + better Python is the main objective.

Finally we believe fixing code challenges is a very effective way to become a better programmer.

Ready for a code challenge? Read on ...

This week you will write a script to calculate the (language) dictionary word that would have the most value in Scrabble.

Read in dictionary.txt (a copy of /usr/share/dict/words on my Mac) and calculate the word that has the most value in Scrabble based on LETTER_SCORES which is imported in wordvalue-template.py.

See the full code challenge here.

This will be a two-part code challenge. Next week you will expand on this building a simple command line game. Something like giving a user a bunch of letters and let him/her create a high-value word (like Scrabble but without the board).

Get started

Fork our repo and get coding ... have fun!

Like this idea?

Any feedback or comments are welcome below or on HN. Thanks for trying!


Keep Calm and Code in Python!

Bob + Julian


See an error in this post? Please submit a pull request on Github.

Join our community and grab our Become a Better Python Developer cheat sheet. Learn Python. Receive bonus material. Challenge yourself!