Conversation
beccaelenzil
left a comment
There was a problem hiding this comment.
Nice work! You've worked through some tricky logic in clever ways and clearly met the learning goals. I've left a few minor comments on ways you might consider refactoring, but overall great work!
| } | ||
|
|
||
| # creates list of letter distribution in adagrams game, returns list | ||
| def build_letter_pool(): |
There was a problem hiding this comment.
Nice use of a helper function.
| # calls letter_pool_list, iterates through list to generate letter hand for user | ||
| def draw_letters(): | ||
| pass | ||
| #build a list of all the letters |
There was a problem hiding this comment.
Clear logic and good use of comments to clarify even further!
| for char in word: | ||
| if char.upper() in letter_bank_copy: |
There was a problem hiding this comment.
Consider refactoring to reassign char = char.upper() to make it even more clear you're making this function case insensitive.
| ########################################################### | ||
|
|
||
| #make constant_dict for letter_score | ||
| LETTER_SCORE = { |
There was a problem hiding this comment.
Consider moving this data structure to the top so that all of your constants are in one place.
| for char in word: | ||
| total_score += LETTER_SCORE[char.upper()] | ||
|
|
||
| # add 8 to total score if letter len is >= 7 |
There was a problem hiding this comment.
The comments on line 121 and 125 are almost identical to your code. While guiding comments can enhance the readability of your code, these types of comments are ok to leave out (or good to remove if they were there as pseudo-code)
| ########################################################### | ||
|
|
||
| # returns highest_scoring_word and max_score | ||
| def get_highest_word_score(word_list): |
There was a problem hiding this comment.
This function is clear and logical. You might consider breaking out the tie breaking logic into a helper function to further enhance readability.
No description provided.