670 Lafayette Ave, Brooklyn,
NY 11216

+1 800 966 4564
+1 800 9667 4558

``````print("Welcome to the Love Calculator!")
combined_names = name1 + name2
lower_case_name = combined_names.lower()
t = lower_case_name.count("t")
r = lower_case_name.count("r")
u = lower_case_name.count("u")
e = lower_case_name.count("e")
digit1 = t + r + u + e
l = lower_case_name.count("l")
o = lower_case_name.count("o")
v = lower_case_name.count("v")
e = lower_case_name.count("e")
digit2 = l + o + v + e
score = int(str(digit1) + str(digit2))
print(f"{score}")
if score <= 10 or score >= 80:
print(f"\nYour Love Score is {score}, you go together like coke and mentos.")
elif score >= 40 or score <= 50:
print(f"\nYour Love Score is {score}, you are alright together.")
else:
``````

You are going to write a program that tests the compatibility between two people.

To work out the love score between two people:

Take both people’s names and check for the number of times the letters in the word TRUE occurs. Then check for the number of times the letters in the word LOVE occurs. Then combine these numbers to make a 2 digit number.

For Love Scores less than 10 or greater than 90, the message should be:

`"Your score is **x**, you go together like coke and mentos."`

For Love Scores between 40 and 50, the message should be:

`"Your score is **y**, you are alright together."`

Otherwise, the message will just be their score. e.g.:

`"Your score is **z**."`

e.g.

`name1 = "Angela Yu"`

`name2 = "Jack Bauer"`

T occurs 0 times

R occurs 1 time

U occurs 2 times

E occurs 2 times

Total = 5

L occurs 1 time

O occurs 0 times

V occurs 0 times

E occurs 2 times

Total = 3

Love Score = 53

# Example Input 1

``name1 = "Kanye West"``
``name2 = "Kim Kardashian"``

# Example Output 1

``Your score is 42, you are alright together.``

# Example Input 2

``name1 = "Brad Pitt"``
``name2 = "Jennifer Aniston"``

# Example Output 2

``Your score is 73.``