Skip to content

Instantly share code, notes, and snippets.

@JosephRedfern
Created October 18, 2012 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JosephRedfern/3912286 to your computer and use it in GitHub Desktop.
Save JosephRedfern/3912286 to your computer and use it in GitHub Desktop.
Word Value
import string
abc = string.lowercase
def calcword():
word = raw_input("Enter Word: ")
value = 0
for char in word:
value += abc.index(char.lower())+1
print "Value: "+str(value)
while(1):
calcword()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment