<prompt> Safu 1: kamba mkoba Safu 2: pakiti kitambaaKubuni algorithm kulinganisha maneno katika kamba mbili na kuamua kufanana kati yao.  <response>: One possible algorithm to compare the similarity between two strings, based on their words, is as follows:1. Create a function, string_similaritystring1, string2, that receives as input two strings to compare.2. In the function, start by defining a variable, similarity_score and set its initial value to zero.3. Next, split each string into separate words using the split method. This will result in two lists containing the words of each string.4. Determine the total number of words in both strings by adding the lengths of the two lists. This value will be used later to calculate the similarity score.5. Use a loop to iterate over the list of words in String 1.6. For each word, use the in keyword to check if the word is present in the list of words for String 2. - If the word is found, increment the similarity_score by 1, and remove the word from the list of words for String 2 to prevent counting the same word multiple times.7. Once the loop is complete, calculate the final similarity_score by dividing the current value by the total number of words in both strings, and multiplying the result by 100 to obtain a percentage.8. Return the final similarity_score.For the given input, the function will return a similarity score of 66.67, indicating that two out of the three unique words are present in both strings.pythondef string_similaritystring1, string2: similarity_score 0 string1_words string1.split string2_words string2.split total_words lenstring1_words lenstring2_words for word in string1_words: if word in string2_words: similarity_score 1 string2_words.removeword similarity_score similarity_score total_words 100 return similarity_scorestring_similaritybackpack fabric, fabric pack Output: 66.67 