# Arup Guha
# 1/11/2013
# Solution to Programming Knights Practice Program Chapter 4 Problem 1
# String Scoring

def main():

    # Get the two input words.
    word1 = input("Enter the first word.\n")
    word2 = input("Enter the second word.\n")

    # Simple case with mismatching lengths.
    if len(word1) != len(word2):
        print("The similarity score is 0.")

    else:

        score = 0

        # Go through each letter.
        for i in range(len(word1)):

            # Add one if corresponding letters match.
            if word1[i] == word2[i]:
                score = score + 1

        # Print the result for this case.
        print("The similarity score is ",score,".", sep="")

main()
