Skip to content

UofT-DSI | Python - Assignment 1#1

Open
kimberlynurse wants to merge 2 commits intomainfrom
assignment-1
Open

UofT-DSI | Python - Assignment 1#1
kimberlynurse wants to merge 2 commits intomainfrom
assignment-1

Conversation

@kimberlynurse
Copy link
Copy Markdown
Owner

@kimberlynurse kimberlynurse commented Oct 20, 2025

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

I added code to assignment_1.ipynb

What did you learn from the changes you have made?

I learned how to define a function to build an anagram checker and expand its functionality with a boolean option for case sensitivity.

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

There was no other approach.

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

One challenge I faced was writing the correct nested conditionals to obtain the anticipated output. I overcame this by breaking it down into separate if else conditional statements to understand the code I needed before trying to nest them.

How were these changes tested?

I saved the assignment_1.ipynb file in a separate folder then tested and modified the code as necessary. In this file, I also tested other strings/anagrams of different lengths and with different cases and characters (for example “Note_3”, “tone”).

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

Checklist

  • I can confirm that my changes are working as intended

Copy link
Copy Markdown

@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.

You're close! However, the logic for handling is_case_sensitive is reversed. Right now, it always converts both words to lowercase before comparing, even when is_case_sensitive=True! Please revise

Copy link
Copy Markdown

@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.

2 participants