def value(letter):
    return ord(letter) - ord('a') + 1

#print (value("a"))

def price(word, letter):
    price = 0
    for i in word
        if i == letter
            price = price + value(letter)
    reuturn price

print(price('bananas'))
print(price('rice'))
print(price('paprika'))
print(price('potato chips'))