Skip to content

Whales C17- Nishat Salsabil and Julie Warren Adagrams #43

Open
nishatsalsabil wants to merge 9 commits intoada-c17:masterfrom
nishatsalsabil:master
Open

Whales C17- Nishat Salsabil and Julie Warren Adagrams #43
nishatsalsabil wants to merge 9 commits intoada-c17:masterfrom
nishatsalsabil:master

Conversation

@nishatsalsabil
Copy link

No description provided.

Copy link

@jericahuang jericahuang left a comment

Choose a reason for hiding this comment

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

Great work on this project, Nish and Julie! The code you wrote together both passed all the tests and met the learning goals. I also made note of great highlights I saw. You both have earned a 🟢 on Adagrams!

def draw_letters():
pass
'''
input: none

Choose a reason for hiding this comment

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

Yay docstrings!

each letter in the LETTER_POOL
'''
hand = []
letter_freq = {}

Choose a reason for hiding this comment

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

Excellent use of a dictionary to keep track of letters and their frequencies

False otherwise or if char in word is not in hand.
'''
word = word.upper()
hand_copy = copy.deepcopy(hand)

Choose a reason for hiding this comment

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

Great way to avoid side effects!

output: Returns True if each char is uniquely in hand. Returns
False otherwise or if char in word is not in hand.
'''
word = word.upper()

Choose a reason for hiding this comment

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

Nice! This will not introduce a side effect because strings are immutable!

played_word_dict[word] = score

highest_score = max(played_word_dict.values())
best_word_list = [key for key, value in played_word_dict.items()\

Choose a reason for hiding this comment

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

Lovely list comprehension!

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.

2 participants