-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathnumerology.py
executable file
·223 lines (193 loc) · 9.88 KB
/
numerology.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
#!/usr/bin/python3
class Person:
def __init__(self, name, surname):
self.name = name
self.surname = surname
self.calcTable = {'A':1,'Á':1, 'J':1, 'S':1,'Š':1, 'B':2, 'K':2, 'T':2, 'Ť':2,'C':3, 'Č':3, 'L':3, 'U':3, 'Ú':3, 'Ů':3, 'D':4, 'Ď':4, 'M':4, 'V':4,'E':5, 'É':5, 'Ě':5,
'N':5,'Ň':5, 'W':5,'Ö':5, 'F':6, 'O':6,'Ó':6, 'X':6,'G':7, 'P':7, 'Y':7, 'Ý':7,'H':8, 'Q':8, 'Z':8,'Ž':8,'I':9,'Í':9, 'Ü':9, 'R':9, 'Ř':9}
self.risks = [7, 16, 25, 34, 52, 61, 70, 79, 88, 92]
self.highrisks = [29, 40, 43]
self.problematic = 0
def gcalc(self, word):
"""Calculate the gross number from the word."""
word = list(word)
total = 0
for letter in word:
value = self.calcTable[letter]
total = total + value
return(total)
def reduce(self, number):
"""Reduce gross numbers to netto numbers."""
if number == 11 or number == 22: # Numbers 11 or 22 should not be reduced.
total = number
else:
total = number
size = len(str(total))
if size > 1:
while size > 1: # Repeats until the number is not fully reduced to one digit only.
if total == 11 or total == 22: #Numbers 11 or 22 should not be reduced.
break
word = str(total)
word = list(word)
total = 0
for letter in word:
total = total +int(letter)
size = len(str(total))
else:
total = number
return(total)
def ncalc(self, word):
"""Calculate the netto numbers."""
word = list(word)
total = self.gcalc(word)
total = self.reduce(total)
return(total)
def getInNum(self):
"""Return the numeric value of the first letter in a name."""
nletter = list(self.name)
nletter = nletter[0]
total = self.calcTable[nletter]
return(total)
def getIsNum(self):
"""Return the numeric values of the first letter in a surname."""
sletter = list(self.surname)
sletter = sletter[0]
total = self.calcTable[sletter]
return(total)
def getWest(self):
"""Return the number for the western part of cross."""
west = self.ncalc(self.name)
west = self.reduce(west)
return(west)
def getEast(self):
"""Return the number for the eastern part of cross."""
east = self.ncalc(self.surname)
east = self.reduce(east)
return(east)
def getSubNorth(self):
subnorth = self.getInNum()+self.getIsNum()
return(subnorth)
def getNorth(self):
"""Return the personal number."""
north = self.getSubNorth()
north = self.reduce(north)
return(north)
def getFirst(self):
"""Return the number of the first life trimester."""
first = self.gcalc(self.name) + self.gcalc(self.surname)
return(first)
def getSecond(self):
"""Return the number of the second life trimester."""
second = self.getNorth() + self.getFirst()
return(second)
def getThird(self):
"""Return the number of the third life trimester."""
third = (self.gcalc(self.name)+self.getSubNorth()) + (self.gcalc(self.surname)+self.getSubNorth())
return(third)
def getSouth(self):
"""Return the number in the southern part of cross."""
south = self.reduce(self.getThird())
return(south)
def calcCross(self):
"""Return the values of the horizontal and vertical additions on the cross."""
horizontal = self.getWest()+self.getEast()
vertical = self.getNorth()+self.getSouth()
middle = horizontal + vertical
return(horizontal,vertical,middle)
def getLowest(self):
number = self.getThird()
size = len(str(number))
if size > 1:
number = list(str(number))
total = 0
for num in number:
total = total + int(num)
else:
total = number
return(total)
def getRisk(self,number):
"""Find out whether a number is a risk number."""
if number in self.risks:
risk = '!'
elif number in self.highrisks:
risk = 'X'
else:
risk = ''
return(risk)
def getFlow(self, number):
"""Find out whether there is an energy leak."""
if number == 8:
flow = 'EF'
elif number%8 == 0:
flow = 'PEF'
else:
flow = ''
return(flow)
class PrintCross:
"""Print out all values in the cross (no background though)."""
def __init__(self, person):
self.person = person
def printCross(self):
print(' {} '.format(self.person.getNorth()))
print(' ')
print(' {} {} '.format(self.person.getInNum(), self.person.getIsNum()))
print(' ')
print('{} {}'.format(self.person.getWest(), self.person.getEast()))
print(' {} '.format(self.person.getFirst()))
print(' ')
print(' {} {} {} '.format(self.person.gcalc(name), self.person.getSecond(), self.person.gcalc(surname)))
print(' ')
print(' {} '.format(self.person.getThird()))
print(' ')
print(' {} {} '.format((self.person.gcalc(name)+self.person.getNorth()), (self.person.gcalc(surname)+self.person.getNorth())))
print(' {} '.format(self.person.getLowest()))
print(' ')
print(' {} '.format(self.person.getSouth()))
class PrintNums:
def __init__(self, person):
self.person = person
def printNums(self):
print("Výpočet pro jméno:",self.person.name, self.person.surname)
print("=============================================================")
print("Hrubé číslo jména:", self.person.gcalc(name), self.person.getRisk(self.person.gcalc(name)))
print("Hrubé číslo příjmení:", self.person.gcalc(surname), self.person.getRisk(self.person.gcalc(surname)))
print("-------------------------------------------------------------")
print("Západ:", self.person.getWest(), self.person.getRisk(self.person.getWest()))
print("Východ:", self.person.getEast(), self.person.getRisk(self.person.getEast()))
print("Sever:", self.person.getNorth(), self.person.getRisk(self.person.getNorth()))
print("Jih:", self.person.getSouth(), self.person.getRisk(self.person.getSouth()))
print("-------------------------------------------------------------")
print("Číslo iniciály jména: ", self.person.getInNum(), self.person.getRisk(self.person.getInNum()))
print("Číslo iniciály příjmení: ", self.person.getIsNum(), self.person.getRisk(self.person.getIsNum()))
print("Číslo osobnosti: ",self.person.getSubNorth(),self.person.getRisk(self.person.getSubNorth()))
print("-------------------------------------------------------------")
print("Číslo první fáze života: ", self.person.getFirst(), self.person.getRisk(self.person.getFirst()))
print("Číslo druhé fáze života: ", self.person.getSecond(), self.person.getRisk(self.person.getSecond()))
print("Číslo třetí fáze života: ", self.person.getThird(), self.person.getRisk(self.person.getThird()))
print("Pomocné číslo je: ", self.person.getLowest(), self.person.getRisk(self.person.getLowest()))
print("-------------------------------------------------------------")
kname = self.person.gcalc(name)+self.person.getSubNorth()
ksurname = (self.person.gcalc(surname)+self.person.getSubNorth())
print("Číslo kombinace jména a osobnosti (vlevo dole):", kname, self.person.getRisk(kname))
print("Číslo kombinace příjmení a osobnosti (vpravo dole):", ksurname, self.person.getRisk(ksurname))
print("-------------------------------------------------------------")
hor, ver, sum = self.person.calcCross()
print("Horizontální výpočet kříže: ", hor, self.person.getRisk(hor), self.person.getFlow(hor))
print("Vertikální výpočet kříže: ", ver, self.person.getRisk(ver), self.person.getFlow(ver))
print("Součet kříže: ", sum, self.person.getRisk(sum), self.person.getFlow(sum))
print("=============================================================")
incoming = input("Zadejte vaše jméno a příjmení (Jan Novák): ")
incoming = incoming.upper()
incoming = incoming.split(" ")
name = incoming[0]
surname = incoming[1]
person = Person(name, surname)
calculation = PrintNums(person)
calculation.printNums()
choice = input("Chcete zobrazit kříž pro toto jméno? (a/n): ")
choice = choice.upper()
if choice == 'A':
cross = PrintCross(person)
cross.printCross()
else:
pass