# Allison Obourn
# CSC 110, Spring 2018
# Lecture 17

# Prompts the user for words until the user types quit.
# Outputs the number of characters the user typed. 

# represents the word that will make the program stop
# prompting. 
SENTINEL = "quit"

def main():
    word = input("Type a word (or \"quit\" to exit): ")
    count = 0
    while word != SENTINEL:
        count = count + len(word)
        word = input("Type a word (or \"quit\" to exit): ")
        
    print("You typed a total of", count, "characters.")

main()
