Sunday, October 13, 2024

Python program to Calculate Your Name Number in Numerology

Python program to Calculate Your Name Number in Numerology
#Python program to Calculate Your Name Number in Numerology

def add(n):
    s=str(n)
    
    madd=n
    while (len(s))>1:
        i=0
        madd=0
        while i<=(len(s)-1):
            madd=madd+int(s[i])
            i=i+1
        s=str(madd)
        
    return madd

n=input("Enter a Name (only Alphabets)?")
 

c=list()
num=[1,2,3,4,5,8,3,5,1,1,2,3,4,5,7,8,1,2,3,4,6,6,6,5,1,7]
t=0.0
tot=0.0
for x in range(0,26):
    c.append(0) 

for x in n:
    x=x.upper()
    if (ord(x)>=65 and ord(x)<=91):        
        c[ord(x)-65]=c[ord(x)-65]+1

for l in range(0,26):
    t=(c[l]*num[l])
    tot=tot+t
    print(chr(l+65),"-",c[l],"-",num[l],"-",t,"-",tot )
    
print()    
print()
print ("Your Name Number in Numerology is =>",add(int(tot)))

Sample Output
Enter a Name (only Alphabets)?IsaacNewton
A - 2 - 1 - 2 - 2.0
B - 0 - 2 - 0 - 2.0
C - 1 - 3 - 3 - 5.0
D - 0 - 4 - 0 - 5.0
E - 1 - 5 - 5 - 10.0
F - 0 - 8 - 0 - 10.0
G - 0 - 3 - 0 - 10.0
H - 0 - 5 - 0 - 10.0
I - 1 - 1 - 1 - 11.0
J - 0 - 1 - 0 - 11.0
K - 0 - 2 - 0 - 11.0
L - 0 - 3 - 0 - 11.0
M - 0 - 4 - 0 - 11.0
N - 2 - 5 - 10 - 21.0
O - 1 - 7 - 7 - 28.0
P - 0 - 8 - 0 - 28.0
Q - 0 - 1 - 0 - 28.0
R - 0 - 2 - 0 - 28.0
S - 1 - 3 - 3 - 31.0
T - 1 - 4 - 4 - 35.0
U - 0 - 6 - 0 - 35.0
V - 0 - 6 - 0 - 35.0
W - 1 - 6 - 6 - 41.0
X - 0 - 5 - 0 - 41.0
Y - 0 - 1 - 0 - 41.0
Z - 0 - 7 - 0 - 41.0


Your Name Number in Numerology is => 5

No comments:

Post a Comment