Make a program with if/else/elif statement in python !

So, my True Love Calculator based from 0 to 100% on below factor:-

  • if the letter match with “T” and match with “L” and if her/his name found 2 times “T” and 2 times “L” then is count 2 : 2
  • iif the letter match with “R” and match with “O” and if her/his name found 1 times “R” and 3 times “O” then is count 1 : 3
  • if the letter match with “U” and match with “V” and if her/his name found 3 times “U” and 2 times “V” then is count 3 : 2
  • if the letter match with “E” and match with “E” and if her/his name found 2 times “E” and 2 times “E” then is count 2 : 2
  • then is true love percentage is = 89 %

Example: –

So, now make a program in python!

# LOVE CALCULATOR

print(“Welcome to the True Love Calculator”)
name = input(“What is your Name?\n”)
name2 = input(“What is their Name?\n”)

combined = name + name2
lowerst = combined.lower()

t = lowerst.count(“t”)
r = lowerst.count(“r”)
u = lowerst.count(“u”)
e = lowerst.count(“e”)

true = t + r + u + e

l = lowerst.count(“l”)
o = lowerst.count(“o”)
v = lowerst.count(“v”)
e = lowerst.count(“e”)

love = l + o + v + e

true_love = int(str(true) + str(love))

if (true_love > 90) and (true_love < 100):
print(f”your score is {true_love}, you like together like Krishna and radha ❤️❤️”)
elif (true_love >= 50) and (true_love <= 90):
print(f”your score is {true_love}, you are alright together ❤️”)
else:
print(f”your score is {true_love}. ?” )

OUTPUT:-

Thank you ! ❤️

STEPS TO CREATE MAIL SERVER ON RHEL MACHINE

Leave a Reply

Your email address will not be published. Required fields are marked *