Skip to content

Complete Python assignment 1 - #384

Open
HaroonV12 wants to merge 1 commit into
UofT-DSI:mainfrom
HaroonV12:assignment-one
Open

Complete Python assignment 1#384
HaroonV12 wants to merge 1 commit into
UofT-DSI:mainfrom
HaroonV12:assignment-one

Conversation

@HaroonV12

Copy link
Copy Markdown

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

Completed Python Assignment 1 by creating an anagram checker that compares two words and returns True or False. I also expanded the function to include an option for case sensitivity.

What did you learn from the changes you have made?

I learned how to create and call functions, use parameters, return boolean values, compare strings, and use methods such as lower() and sorted().

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

Another approach would be to loop through the characters and count how many times each character appears. I used sorted() because it provided a simpler way to compare the characters in the two words.

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

n/a

How were these changes tested?

I tested the function using the examples provided in the assignment, including "Silent" and "listen", "Silent" and "Night", and "night" and "Thing". I also tested the case-sensitive and case-insensitive options to make sure they returned the expected True or False values.

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.

1 participant