I have a simple task that I need to do; let's say I have a word, any word. And in that word, I need to find how many instances of a letter there are. And that letter that I'm finding has a value, let's say 5. I then need to multiply how many instances of that letter there are by 5, to accumulate a total score. Sounds simple enough, but I lack the knowledge in order to make it happen. I've begun coding a test, but even that doesn't work. Any help would be appreciated.
def vowel1(Word,x):
x = a
for a in Word:
if a==x:
print ("True")
print ("False")
Word = input("Please enter a word (from the english dictionary) if you please ")
print (Word)
vowel1(Word,x)
I know there are no signs of a variable with value in that, but I don't know how to do it.