Skip to content
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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

stephanie-chenn1
Copy link

No description provided.

LONG_WORD_POINTS = 8

# Wave 1
def build_letter_pool():
Copy link

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

@tgoslee tgoslee Oct 5, 2021

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

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

Copy link

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

Comment on lines +123 to +124
if LONG_WORD_MIN <= len(cap_word) <=LONG_WORD_MAX:
return score + LONG_WORD_POINTS
Copy link

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

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!

@tgoslee
Copy link

tgoslee commented Oct 5, 2021

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!

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