-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
32 lines (28 loc) · 1017 Bytes
/
main.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
import readDic
import characters
import metaphysic
import random
def main():
print("main")
wuxingCharacters = set(metaphysic.main())
print("Characters got by your shenchenbazi: ")
print(wuxingCharacters)
desiredCharacters = set(list(readDic.main()))
print("Characters got by your wish: ")
print(desiredCharacters)
gender = input("Male or female? Input 1 to represent male, input 2 to represent female: ")
if gender == 1:
genderCharacters = set(characters.male)
else:
genderCharacters =set(characters.female)
print("Characters got by gender: ")
print(genderCharacters)
finalResult = desiredCharacters & desiredCharacters & genderCharacters
print('Final result: ')
print(finalResult)
finalResultList = list(finalResult)
finalName = finalResultList[random.randint(0, len(finalResultList))] + finalResultList[random.randint(0, len(finalResultList))]
print('Test name: ')
print(finalName)
if __name__ == '__main__':
main()