20 lines
No EOL
542 B
Python
20 lines
No EOL
542 B
Python
import collections
|
|
|
|
def calculate_love_score(name1, name2):
|
|
two_names = name1.replace(" ", "").lower() + name2.replace(" ", "").lower()
|
|
t = two_names.count("t")
|
|
r = two_names.count("r")
|
|
u = two_names.count("u")
|
|
e1 = two_names.count("e")
|
|
|
|
l = two_names.count("l")
|
|
o = two_names.count("o")
|
|
v = two_names.count("v")
|
|
e2 = two_names.count("e")
|
|
score_1 = t + r + u + e1
|
|
score_2 = l + o + v + e2
|
|
print(f"{score_1}{score_2}")
|
|
|
|
|
|
# Call your function with hard coded values
|
|
calculate_love_score("Kanye WesT", "Kim Kardashian") |