# Arup Guha
# 7/11/2012
# Scrabble Example: Scores a Word in Scrabble (without any special points.

def main():

    # All letter values.
    VALUES = [1,3,3,2,1,4,2,4,1,8,5,1,3,1,1,3,10,1,1,1,1,4,4,8,4,10]

    # Get the word to score.
    word = input("What is your scrabble word? All uppercase please.\n")

    score = 0

    # Go through each letter.
    for i in range(len(word)):

        # Convert letter to number.
        rank = ord(word[i]) - ord('A')

        # Add this letter's score.
        score = score + VALUES[rank]

    # Bonus for using all tiles.
    if len(word) == 7:
        score = score + 50

    # Print score.
    print("Your word is worth",score,"points.")

main()
