Skip to content

https://github.com/tselot-t/python.git - #1

Open
tselot-t wants to merge 2 commits into
mainfrom
assignment-1
Open

tselot-t wants to merge 2 commits into
mainfrom
assignment-1

Conversation

@tselot-t

Copy link
Copy Markdown
Owner

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

I wrote code for an anagram checker with an option for case-sensitive checking.

What did you learn from the changes you have made?

I learned the importance of code logic and how to make code more efficient using inverted logic. I also learned how to check the results of each component of a function for debugging.

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

When writing the code for the case sensitive section, I was thinking about whether I could combine the case sensitive parameter with the word length parameter instead of adding it as another nested if statement.

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

The main challenge I had was in the first section because I was not paying attention to case sensitivity. I thought "Silent" had a lowercase "s" so I couldn't figure out why I wasn't getting the right output. Then, I realized I had to add this consideration to the code. The other thing was using inverted logic. I was writing the code to check if all the conditions were satisfied instead of making the function look for any condition that was not satisfied. When I switched to the latter, writing the code became easier.

How were these changes tested?

I tested the script using some print functions for each component of the anagram checker. Then I used the test cases provided. I also checked online for other functions that could work for this assignment. I found that despite the fact that my code works, it isn't a perfect anagram checker and there are some nuances that if addressed would make the code work better. E.g. comparing words with the same letters and same length but different number of each letter such as banana vs nababa.

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

N/A

Checklist

  • I can confirm that my changes are working as intended

@tselot-t tselot-t closed this Oct 14, 2026
@tselot-t tselot-t reopened this Oct 14, 2026
@tselot-t tselot-t closed this Oct 14, 2026
@tselot-t tselot-t reopened this Oct 14, 2026

@KasraVakiloroayaei KasraVakiloroayaei left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A1: Complete

Great Work

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