Skip to content

UofT-DSI | Python - Assignment 3#1

Open
lsmamy wants to merge 3 commits intomainfrom
assignment-3
Open

UofT-DSI | Python - Assignment 3#1
lsmamy wants to merge 3 commits intomainfrom
assignment-3

Conversation

@lsmamy
Copy link
Owner

@lsmamy lsmamy commented Aug 24, 2025

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

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

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

@lsmamy
Copy link
Owner Author

lsmamy commented Aug 28, 2025

i've updated with revisions

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.

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.

@lsmamy
Copy link
Owner Author

lsmamy commented Sep 1, 2025

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!

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.

Good!

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