79476771

Date: 2025-02-28 22:01:38
Score: 0.5
Natty:
Report link
str1 = str(input())
str2 = str(input())

list1 = []
list2 = []

count = 0

for letter in str1:
    list1.append(letter)
for letter in str2:
    list2.append(letter)    
    

while len(list1) > 0 and len(list2) > 0:

    if list1[0] == list2[0]:
        list1.pop(0)
        list2.pop(0)
        count +=1
    else:
        list1.pop(0)
        list2.pop(0)
if count == 1:
    print(f'{count} character matches')
else:
    print(f'{count} characters match')
    
    

while len(list1) > 0 and len(list2) > 0:

    if list1[0] == list2[0]:
        list1.pop(0)
        list2.pop(0)
        count +=1
    else:
        list1.pop(0)
        list2.pop(0)
if count == 1:
    print(f'{count} character matches')
else:
    print(f'{count} characters match')
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: oliver