Skip to content

Updated Python assignment1 commit message#1

Open
SairoTech wants to merge 1 commit intomainfrom
assignment-1
Open

Updated Python assignment1 commit message#1
SairoTech wants to merge 1 commit intomainfrom
assignment-1

Conversation

@SairoTech
Copy link
Copy Markdown
Owner

@SairoTech SairoTech commented Sep 3, 2024

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

 The code is to compare if two words are anagram. In the first part, the cases of the words were not considered. In the second part, a boolean parameter is_case_sensitive was added to compare words in both forms - is case-sensitive and not case sensitive. To perform this activity two functions were used - lower() and sorted()

What did you learn from the changes you have made?

I learned to use different Python functions, understood the basic program structure( indents and syntax), etc

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

The approach I took to implement anagram checker is to utilize the inbuilt functions to sort the characters and then compare the sorted characters to check if they are anagrams. Also, made use of nested ifs to include multiple conditions for case-sensitive and case-insensitive checks. 

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

The challenges were to identify the logic that needs to be applied as it was incomplete in my initial attempts. Needed to make sure I have covered all requirements as expected in the assignment by keeping the code quality and following the standard naming conventions for variables, functions etc. I overcame this through multiple revisions and comparing my results with the expected results.

How were these changes tested?

I passed various inputs to the function to ensure the expected outcome is displayed.

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

N/A

Checklist

  • I can confirm that my changes are working as intended

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