Skip to content

Assignment 1 completed#1

Open
dtolgay wants to merge 3 commits intomainfrom
assignment-1
Open

Assignment 1 completed#1
dtolgay wants to merge 3 commits intomainfrom
assignment-1

Conversation

@dtolgay
Copy link
Copy Markdown
Owner

@dtolgay dtolgay commented Oct 14, 2025

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

I defined a module for anagram checker. I used string comparison.

What did you learn from the changes you have made?

I refreshed my memory for string comparison

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

I could write an another function and use that for putting letters to a list. I did the same operation twice using the same code.

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

No challenges.

How were these changes tested?

I compared with the provided answers.

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

Checklist

  • [ x] 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.

Good, however there are a few minor errors.
For part A, You accidentally compared letters_a to itself. That condition will always be False, so the length check never triggers.
For part B, In both branches of your first if, you used .upper(), so the “case sensitive” setting doesn’t actually change anything.
Please revise.

@dtolgay
Copy link
Copy Markdown
Owner Author

dtolgay commented Oct 23, 2025

Okay I implemented the changes. I hope this one is correct now.

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.

Good! One note for improvement, you could simplify your code by converting case and sorting directly with sorted(), which removes the need to manually create lists or loop through each letter!

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