DEV Community

Chiel
Chiel

Posted on

Python beginner.

Hello everybody, this is my first post here. I dont know if I am posting in the correct section, but here we go. In the study I work on I have to work on a calculator, but I am not able to see the score when I run it. Hoping you can help me.

print("Welcome to the love calculator")
name1 = input("What is your name? ")
name2 = input("What is your partners name? ")

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 menthos.")
elif (score >= 40) and (score <= 50):
print(f"your score is (score), you folks are alright together.")
else:
print(f"your score is (score), you should find someone else!")

Top comments (0)