-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maple- Nicole W and Stephanie C #50
base: master
Are you sure you want to change the base?
Conversation
…passses wave 01 test
LONG_WORD_POINTS = 8 | ||
|
||
# Wave 1 | ||
def build_letter_pool(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of making two functions that create a letter pool dictionary and letter pool list, I was curious as to why you didn't create two constant variables to hold the letter pool dictionary and letter pool list? This is truly a curiosity question because I haven't seen this approach yet!
"""This function returns True if every letter in the input word | ||
is available in the right quantities from the letter bank. Otherwise, | ||
it returns False.""" | ||
letter_bank_copy = letter_bank.copy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great use of the copy method here. Here is a link to the docs that go into more depth about copy()
vs deepcopy()
if you haven't already check it out: https://docs.python.org/3/library/copy.html
return True | ||
|
||
|
||
def build_score_chart(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again you could just make this a constant global variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and you could use a list in the key-value pairs for the letters that have the same score
if LONG_WORD_MIN <= len(cap_word) <=LONG_WORD_MAX: | ||
return score + LONG_WORD_POINTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great choice to make these constant variables and use them here
score += point | ||
if LONG_WORD_MIN <= len(cap_word) <=LONG_WORD_MAX: | ||
return score + LONG_WORD_POINTS | ||
return score | ||
|
||
def get_highest_word_score(word_list): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the use of helper functions you created!
Great job! I loved seeing how you both approached this! I added comments on refactoring some of your code and great use of helper functions! |
No description provided.