Skip to content

Commit 3d92769

Browse files
committed
Added love_calculator.py to Python-Basic-to-Advance repo
1 parent 7130007 commit 3d92769

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

love_calculator.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name1=input("what is your name?")
2+
name2=input("what is his/her name?")
3+
combine_string=name1+name2
4+
lower_case_string=combine_string
5+
6+
t=lower_case_string.count('t')
7+
r=lower_case_string.count('r')
8+
u=lower_case_string.count('u')
9+
e=lower_case_string.count('e')
10+
true=t+r+u+e
11+
12+
l=lower_case_string.count('l')
13+
o=lower_case_string.count('o')
14+
v=lower_case_string.count('v')
15+
e=lower_case_string.count('e')
16+
love=l+o+v+e
17+
18+
love_score=int(str(true)+str(love))
19+
20+
if love_score<10 or love_score>90:
21+
print(f"Your score is {love_score} and you go together like coke and mentos")
22+
elif love_score>=40 and love_score<=50:
23+
print(f"Your score is {love_score} and you are alright together")
24+
else:
25+
print(f"Your love_score is {love_score}")

0 commit comments

Comments
 (0)