JkSoftware

Day 3 - Love Calculator

Nov 5th, 2021 (edited)
158
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #  Don't change the code below
  2. print("Welcome to the Love Calculator!")
  3. name1 = input("What is your name? \n")
  4. name2 = input("What is their name? \n")
  5. #  Don't change the code above
  6.  
  7. #Write your code below this line
  8.  
  9.  
  10. name = name1 + name2
  11. name = name.lower()
  12. print(name)
  13. a = (
  14.     name.count("t") + name.count("r") + name.count("u") + name.count("e")
  15. )
  16. b = (
  17.     name.count("l") + name.count("o") + name.count("v") + name.count("e")
  18. )
  19.  
  20. love = str(a) + str(b)
  21. love = int(love)
  22.  
  23. if love < 10 or love > 90:
  24.     print(f"Your score is {love} You go together like coke and mentos")
  25. if love == range(40, 50):
  26.     print(f"Your score is {love} you ok together")
  27. else:
  28.     print(f"Your score is {love}")
  29.  
RAW Paste Data Copied