[Solved] What is wrong with my Lucky name Number python code


This should work for your purposes:

name = input("Please enter your name: ")
name = name.lower()
luckynumb = 0
firstnamenumb = 0  
surnamenumb = 0  

number = [1, 2, 3, 4, 5, 6, 7, 8, 9]  
row1 = ["a", "b", "c", "d", "e", "f", "g", "h", "i"]  
row2 = ["j", "k", "l", "m", "n", "o", "p", "q", "r"]  
row3 = ["s", "t", "u", "v", "w", "x", "y", "z"] 

for letter in name:  
    if   letter == "a" or letter == "j" or letter == "s":   luckynumb += 1  
    elif letter == "b" or letter == "k" or letter == "t":   luckynumb += 2
    elif letter == "c" or letter == "l" or letter == "u":   luckynumb += 3
    elif letter == "d" or letter == "m" or letter == "v":   luckynumb += 4
    elif letter == "e" or letter == "n" or letter == "w":   luckynumb += 5
    elif letter == "f" or letter == "o" or letter == "x":   luckynumb += 6
    elif letter == "g" or letter == "p" or letter == "y":   luckynumb += 7
    elif letter == "h" or letter == "q" or letter == "z":   luckynumb += 8
    elif letter == "i" or letter == "r":                    luckynumb += 9

surnamenumb = - luckynumb  

while int(firstnamenumb) > 9: 
    split = list(str(firstnamenumb))  # it will
    firstnamenumb = int(split[0]) + int(split[1])  
    print(firstnamenumb)  

while int(surnamenumb) > 9:  
    split = list(str(surnamenumb))  # it will
    surnamenumb = int(split[0]) + int(split[1])  
    print(surnamenumb) 

luckynumb = firstnamenumb + surnamenumb  

luckynumb = abs(luckynumb) % 9

print(luckynumb)

if   int(luckynumb) == 0:   print("Natural Leaders")  
elif int(luckynumb) == 1:   print("Natural Peacemakers") 
elif int(luckynumb) == 2:   print("Creative and Optimistic")  
elif int(luckynumb) == 3:   print("Hard Workers")  
elif int(luckynumb) == 4:   print("Values Freedom") 
elif int(luckynumb) == 5:   print("Careers and Providers")  
elif int(luckynumb) == 6:   print("Thinkers")  
elif int(luckynumb) == 7:   print("Has Diplomatic Skills") 
elif int(luckynumb) == 8:   print("Selfless and Generous")  
else:                       print("Error! Please try again") 

Also, check out the PEP-8 style guide for python. It will help I promise:
https://www.python.org/dev/peps/pep-0008/

1

solved What is wrong with my Lucky name Number python code