Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anagram #9

Open
xasterKies opened this issue Oct 31, 2021 · 7 comments
Open

Anagram #9

xasterKies opened this issue Oct 31, 2021 · 7 comments
Assignees
Labels
challenge Daily Challenge Intermediate Intermdiate coding problem

Comments

@xasterKies
Copy link
Collaborator

Directions

Check to see if two provided strings are anagrams of each other. One String is an anagram of another if it uses the same character in the same quantity. Only consider characters, not spaces or punctuation. Consider capital letters in your program. Make use of Functions and Methods where necessory

You can code this with any language of your choice!

Examples

anagrams( 'rail safety' , 'fairy tales' ) -----> True
anagrams( 'RAIL! SAFETY!' , 'fairy tales' ) -----> True
anagrams( 'Hi there' , 'Bye there' ) -----> False

@xasterKies xasterKies added challenge Daily Challenge Intermediate Intermdiate coding problem labels Oct 31, 2021
@S10MC2015
Copy link

S10MC2015 commented Oct 31, 2021

Again how do you want this commited?

import re
def anagrams(wordoneee, wordtwooo):
    wordonee = re.sub(r'[^\w\s]', '', wordoneee)
    wordtwoo = re.sub(r'[^\w\s]', '', wordtwooo)

    wordone = wordonee.lower()
    wordtwo = wordtwoo.lower()
    listwordtwo = list(wordtwo)
    lentwo = len(wordtwo)
    for i in range(0,lentwo):
        wordone = wordone.replace(listwordtwo[i],"")
    if wordone == "":
        return True
        exit()
    else:
        return False
        exit()

wordone = input("wordone ") 
wordtwo = input("wordtwo ")
print(anagrams(wordone, wordtwo))

@xasterKies
Copy link
Collaborator Author

Hello @S10MC2015 Checkout the ReadMe it has all instructions on how to do so!

@xasterKies
Copy link
Collaborator Author

Normally we are suppose to do commits rather than commenting, The ReadMe is quite explanatory

@eddybruv
Copy link
Contributor

eddybruv commented Nov 1, 2021

assign me @xaster-Kies

@xxxSkypper
Copy link
Contributor

please assign me

@mtrishal123
Copy link

Please assign me

@xasterKies
Copy link
Collaborator Author

done @mtrishal123

@xasterKies xasterKies self-assigned this Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
challenge Daily Challenge Intermediate Intermdiate coding problem
Projects
None yet
Development

No branches or pull requests

5 participants