Final answer:
To solve this problem, you can use a while loop to repeatedly ask the user for input until both strings have a length greater than 0.
Step-by-step explanation:
To solve this problem, you can use a while loop to repeatedly ask the user for input until both strings have a length greater than 0. You can use the len() function to find the length of a string. Then, you can check if the two strings have the same length using an if statement. If they do not have the same length, you can print 'Strings do not match in length' and prompt the user to enter both strings again.
If the strings have the same length, you can use nested loops to iterate through both strings. Inside the nested loops, you can compare each letter in the first string to each letter in the second string. If a letter of the first string is in the second string and in the same spot, you can print 'w is in the input 2 string and in the correct spot 1', where w is the letter you are checking and 1 is the position in both strings.
You can keep track of the number of correct letters in the correct spot by using a variable. You can print 'Correct letters in correct spot: X', where X is the number of correct letters in the correct spot discovered so far. If a letter of the first string is in the second string but in a different spot, you can print 'o is in the input_2 string but not in the correct spot'.
If all the letters in both strings are the same, you can print 'Strings are the same'.