Tanveer Assignment 1: Anagram Checker with test script #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes are you trying to make?
Added an Anagram Checker that can determine if two words are anagrams, with an optional case-sensitive mode. Included a small test script to validate outputs.
What did you learn from the changes you have made?
How to implement basic string manipulation in Python and handle case sensitivity for comparisons.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
An alternative approach could have been using a
Counterfrom thecollectionsmodule to count letters instead of sorting, but I chose sorting for simplicity.Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
No major challenges. Initially had to make sure the notebook and test script were properly staged and pushed from the correct folder.
How were these changes tested?
Test cases were added for both the case-insensitive and case-sensitive versions of the function. Output was verified to match expected results.
A reference to a related issue in your repository (if applicable)
NA
Checklist