-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLoveCalculator
27 lines (21 loc) · 1.09 KB
/
LoveCalculator
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
# 🚨 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 👇
lower_name1 = name1.lower()
lower_name2 = name2.lower()
true1 = (lower_name1.count('t') + lower_name1.count('r') + lower_name1.count('u') + lower_name1.count('e'))
love1 = (lower_name1.count('l') + lower_name1.count('o') + lower_name1.count('v') + lower_name1.count('e'))
true2 = (lower_name2.count('t') + lower_name2.count('r') + lower_name2.count('u') + lower_name2.count('e'))
love2 = (lower_name2.count('l') + lower_name2.count('o') + lower_name2.count('v') + lower_name2.count('e'))
total_true = (true1 + true2)
total_love = (love1 + love2)
score = (str(total_true) + str(total_love))
if ((int(score)<10) or (int(score)>90)):
print (f"Your score is {score}, you go together like coke and mentos.")
elif ((int(score)>=40) and (int(score)<=50)):
print (f"Your score is {score}, you are alright together.")
else:
print (f"Your score is {score}.")