-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
William Xu
committed
Sep 8, 2017
1 parent
63df84d
commit 5cb390e
Showing
4 changed files
with
49 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
import readDic | ||
import characters | ||
import metaphysic | ||
import random | ||
|
||
def main(): | ||
print("main") | ||
metaphysic.main() | ||
readDic.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.maleNames) | ||
else: | ||
genderCharacters =set(characters.femaleNames) | ||
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) | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters