Skip to content

Conversation

@cfzhang96
Copy link
Owner

@cfzhang96 cfzhang96 commented Oct 21, 2025

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

I added the anagram_checker() function to assignment_1.ipynb.
This function checks whether two words are anagrams and prints True or False, depending on the is_case_sensitive parameter.

What did you learn from the changes you have made?

I learned how to handle string comparison in Python, use conditionals effectively, and manage optional case sensitivity in functions.

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

I learned how to handle string comparison in Python, use conditionals effectively, and manage optional case sensitivity in functions.

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

I initially nested one function definition inside another by mistake, so the program didn’t print anything.
I fixed it by removing the inner definition and re-testing the logic step-by-step.

How were these changes tested?

I ran the following test cases:

  • anagram_checker("Silent", "listen", False) → prints True
  • anagram_checker("Silent", "Listen", True) → prints False
  • anagram_checker("night", "Thing", False) → prints True

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

N/A

Checklist

  • I can confirm that my changes are working as intended

Copy link

@juliagallucci juliagallucci left a comment

Choose a reason for hiding this comment

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

Great! One note for improvement, you don’t need to explicitly return True or False since the comparison itself already evaluates to a Boolean.

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