Conversation
juliagallucci
left a comment
There was a problem hiding this comment.
You are on the right track. Your code is checking if each letter in word_a is in word_b, but you’re not removing matched letters!
This means repeated letters can cause false positives. For example: "aabb", "abbb" would return True, but it should be False. Please revise
|
i've updated with revisions |
juliagallucci
left a comment
There was a problem hiding this comment.
Your code is mostly correct. Right now, though, there’s a small indentation bug in Part B, where if is_case_sensitive == False block, resulting in the function returning True after checking only the first character. Please revise.
Thanks! Revised! |
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
anagram
What did you learn from the changes you have made?
I learned how to make a string lower case and how to loop over the characters in a string. I also learned how to use
in.Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
Potentially removing letters from word b as we looped; incase the number of occurrences of a letter mattered.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
Syntactic errors; over came it with the help of google.
How were these changes tested?
Using the provided tests.
A reference to a related issue in your repository (if applicable)
Checklist