Skip to content

Conversation

arcila13
Copy link

No description provided.

def draw_letters():
pass

letter_list = ['A','A','A','A','A','A','A','A','A','B','B',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay for making a copy! Definitely want to avoid side effects.

letters_used.remove(letter)
else:
return False
break
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the break is unnecessary here. Once you return False the code after will be unreachable.

Comment on lines +34 to +40
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']
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great way to group the data that was given

sum += 8
return sum

def get_highest_word_score(word_list):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great way to approach finding the highest score.

@tgoslee
Copy link

tgoslee commented Oct 4, 2021

Great work to both of you. I added comments on refactoring some of your code and how you approached the problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants