-
Notifications
You must be signed in to change notification settings - Fork 0
/
main (3).py
29 lines (25 loc) · 874 Bytes
/
main (3).py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# 🚨 Don't change the code below 👇
print("Welcome to the Love Calculator!")
name1 = input("What is your name? \n")
name2 = input("What is their name? \n")
# 🚨 Don't change the code above 👆
#Write your code below this line 👇
combined_names = name1 + name2
lower_names = combined_names.lower()
t = lower_names.count("t")
r = lower_names.count("r")
u = lower_names.count("u")
e = lower_names.count("e")
first_digit = t + r + u + e
l = lower_names.count("l")
o = lower_names.count("o")
v = lower_names.count("v")
e = lower_names.count("e")
second_digit = l + o + v + e
score = int(str(first_digit) + str(second_digit))
if score < 10 or score > 90:
print(f"Your score is {score}, you go together like coke and mentos.")
elif score > 40 or score < 50:
print(f"Your score is {score}, you are alright together.")
else:
print(f"Your score is {score}.")