Skip to content

Assignment-1 - #386

Open
shimonarebello2-afk wants to merge 1 commit into
UofT-DSI:mainfrom
shimonarebello2-afk:main
Open

Assignment-1#386
shimonarebello2-afk wants to merge 1 commit into
UofT-DSI:mainfrom
shimonarebello2-afk:main

Conversation

@shimonarebello2-afk

Copy link
Copy Markdown

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)

I added an anagram checker function that compares two words to determine if they contain the same letters. I also added a case-sensitive option to allow the user to choose whether uppercase and lowercase letters should be treated differently.

What did you learn from the changes you have made?

I learned how to create and use functions lower() to handle uppercase and lowercase letters, and use sorted() to compare the letters in two words.

Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?

Yes. Another approach would be to count how many times each letter appears in each word and compare the letter counts instead of sorting the words.

Were there any challenges? If so, what issue(s) did you face? How did you overcome it?

N/A

How were these changes tested?

I tested the function using different word combinations including "Silent" and "listen", "Silent" and "Night", and "night" and "Thing". I also tested the is_case_sensitive option with both True and False to make sure the function returned the expected results.

A reference to a related issue in your repository (if applicable)

N/A

Checklist

  • [x ] I can confirm that my changes are working as intended

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.

1 participant