Maple- Adah Hailemariam and Genie Arcila #45
Maple- Adah Hailemariam and Genie Arcila #45arcila13 wants to merge 5 commits intoAda-C16:masterfrom
Conversation
| def draw_letters(): | ||
| pass | ||
|
|
||
| letter_list = ['A','A','A','A','A','A','A','A','A','B','B', |
There was a problem hiding this comment.
I would suggest making your letter_list a global constant variable LETTER_LIST this would clean up your function and remind yourself/other developers this should not be changed
| 'T','T','T','T','T', 'U', 'U', 'U', 'U', 'V', 'V', 'W','W', 'X', 'Y','Y','Z'] | ||
| letters = letter_list.copy() | ||
| chosen_letters = [] | ||
| for i in range(10): |
There was a problem hiding this comment.
instead of a for loop, you could use a while loop that will continue until the length of chosen_letters is less than 10.
| def uses_available_letters(word, letter_bank): | ||
| pass | ||
|
|
||
| letters_used = letter_bank.copy() |
There was a problem hiding this comment.
yay for making a copy! Definitely want to avoid side effects.
| letters_used.remove(letter) | ||
| else: | ||
| return False | ||
| break |
There was a problem hiding this comment.
the break is unnecessary here. Once you return False the code after will be unreachable.
| 1:['A', 'E', 'I','O', 'U', 'L', 'N', 'R', 'S', 'T' ], | ||
| 2:['D', 'G' ], | ||
| 3:['B', 'C', 'M', 'P' ], | ||
| 4:['F', 'H', 'V', 'W', 'Y' ], | ||
| 5:['K'], | ||
| 8:['J', 'X'], | ||
| 10:['Q', 'Z'] |
There was a problem hiding this comment.
great way to group the data that was given
| sum += 8 | ||
| return sum | ||
|
|
||
| def get_highest_word_score(word_list): |
There was a problem hiding this comment.
Great way to approach finding the highest score.
|
Great work to both of you. I added comments on refactoring some of your code and how you approached the problems. |
No description provided.