Friday, 13 September 2013

program to calculate the numeric value of a name

program to calculate the numeric value of a name

i'm trying to do program to calculate the numeric value of a name
that what i wrote
letters = {'a':1 , 'b':2 , 'c':3 , 'd':4 , 'e':5 , 'f':6 , 'g':7 , 'h':8 ,
'i':9 , 'j':10 , 'k':11, 'l':12, 'm':13, 'n':14, 'o':15, 'p':16, 'q':17 ,
'r':18 , 's':19 , 't':20 , 'u':21 , 'v':22, 'w':23 , 'x':24 , 'y':25 ,
'z':26 } n = eval(input("Enter a name: "))
total = 0
for character in n:
total = total + letters
print("Numberic Value:", n, total)
and this what i got >>>>>>>>>>>>> NameError: name 'dell' is not defined

No comments:

Post a Comment