Answer to Question #334872 in Python for Sin

Question #334872

Ramesh and suresh started doing fun activity in which ramesh writes down the word and tell suresh the number of letters in his word. Then suresh tries to guess the word that ramesh had written. After suresh guesses the word they both compare the words to determine the minimum number of letters suresh has to replace his guessed word becomes an anagram of ramesh word.



Note: suresh and ramesh words are same length



Input line contains two space seperated strings



Output must be in single line representing minimum number of letters to be replaced




Input: honey moon



Output: 1



Input: ccbp pbcc



Output: 0




Need correct output sir

1
Expert's answer
2022-04-28T13:21:42-0400
words = input("Enter 2 words of the same length (separate spase)").split()
number_same_letter = 0
for letter in words[1]:
    if letter in words[0]:
        number_same_letter += 1
print("Answer: ", len(words[0]) - number_same_letter)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS