Created
February 17, 2015 08:17
-
-
Save MetroWind/660054c114d7d322f695 to your computer and use it in GitHub Desktop.
生成十二星座性格特点的程序……
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8; -*- | |
from __future__ import print_function | |
import sys, os | |
import copy | |
import random | |
PY_LEGACY = (sys.version_info.major == 2) | |
random.seed() | |
Stars = [ | |
"白羊", | |
"金牛", | |
"双子", | |
"巨蟹", | |
"狮子", | |
"处女", | |
"天秤", | |
"天蝎", | |
"射手", | |
"摩羯", | |
"水瓶", | |
"双鱼", | |
] | |
Zuo = "座" | |
Characters = [ | |
"放荡不羁笑点低", | |
"热情冲动", | |
"爱冒险", | |
"慷慨", | |
"天不怕地不怕,而且一旦下定决心,不到黄河心不死,排除万难的要达到目的", | |
"有时脾气很差,不过只是炮仗颈,绝对不会放在心上,很快便会没有事", | |
"保守", | |
"喜欢稳定,不爱变动", | |
"在性格上则比较慢热", | |
"对工作、生活、环境都需要比较长的适应期", | |
"在投资理财方面常常有很独到的见解", | |
"男人往往有大男人的倾向", | |
"女生喜欢打扮自己", | |
"喜好新鲜事物", | |
"有小聪明,但做事常常不太专一", | |
"与{star}的人聊天也许会让你觉得很兴奋,因为他们脑子中那些新鲜的、稀奇古怪的东西会让有充满好奇", | |
"也许是对新鲜事物的追求和好奇,会让人觉得他们很花心", | |
"充满爱心", | |
"他们将母性的本质发挥到了极限", | |
"对他们来说,最重要的东西是家庭", | |
"是最执着的星座", | |
"对朋友、对家人的忠实,做事会一直坚持到底", | |
"热情阳光", | |
"大方是他们性格上最大的特色", | |
"与他们性格上的优点不同,他们爱面子、自信得有点儿自大", | |
"常常会很在乎别人对自己的看法,也常常会因此而使自己不快乐", | |
"追求完美", | |
"吹毛求疵", | |
"多数的{star}都很谦虚,但也因此给自己造成很大的压力", | |
"不喜欢闲着,对别人常常乐于服务", | |
"缺乏自信的{star}有时候组织能力较差,需要家人与朋友们的鼓励去推动他们", | |
"常常追求和平和谐的感觉", | |
"善于交谈,沟通能力极强", | |
"犹豫不决", | |
"容易将自己的想法加诸到别人身上", | |
"女生常常希望他们的伴侣会时刻陪伴着她", | |
"精力旺盛", | |
"热情", | |
"善妒", | |
"占有欲极强", | |
"想要每天过得非常充实", | |
"失去了目标,他们很难认真地投入精力", | |
"记仇,会不顾一切地打击仇人", | |
"一旦定了目标,就会不达目的誓不罢休", | |
"主动出击", | |
"为人乐观", | |
"诚实", | |
"喜欢挑战", | |
"{star}是十二星座中的冒险家", | |
"热爱旅行", | |
"喜欢赌博", | |
"意志力薄弱是{star}天生的弱点", | |
"{star}是十二星座中最有耐心,为事最小心、也是最善良的星座", | |
"做事脚踏实地", | |
"比较固执", | |
"不达目的不会放手", | |
"忍耐力出奇的强大,同时也非常勤奋", | |
"心中总是背负着很多的责任感", | |
"往往很没有安全感,不会完全地相信别人", | |
"聪明", | |
"最大的特点是创新", | |
"追求独一无二的生活", | |
"个人主义色彩很浓重的星座", | |
"对人友善又注重隐私", | |
"喜欢结交朋友,但是却很难与他们交心", | |
"集合了所有星座的优缺点于一身", | |
"有一颗善良的心", | |
"愿意帮助别人,甚至是牺牲自己", | |
"深爱自由", | |
"不喜欢受到外界的压抑", | |
"有企图心和冒险精神", | |
"勇於尝试", | |
"有主见", | |
"意志坚定", | |
"友善", | |
"有耐心及责任感", | |
"可以信赖", | |
"实际", | |
"可靠", | |
"具有商业头脑和牢靠的价值观", | |
"喜欢美食和精致昂贵的奢侈品", | |
"适应力强", | |
"机智", | |
"敏捷", | |
"喜欢忙碌和变化", | |
"主动", | |
"活泼而健谈", | |
"聪慧且多才多艺", | |
"具有写作和语言方面的天才", | |
"对时尚有着敏锐的感受力", | |
"能够永久维持着年轻和时髦的外貌", | |
"敏感", | |
"富有同情心", | |
"长於记忆", | |
"脑筋敏锐", | |
"领悟力好", | |
"适应力佳", | |
"有高度的想像力", | |
"具强烈的母性或父性的本能", | |
"保护色彩浓厚", | |
"谨慎", | |
"节俭", | |
"有坚强意志力和耐力", | |
"不屈不挠", | |
"理财观念甚佳", | |
"爱国", | |
"博爱", | |
"热心", | |
"慷慨", | |
"有领导能力", | |
"花钱大方", | |
"思想开阔", | |
"具创新的能力", | |
"对戏剧和表演具有天份", | |
"谦虚", | |
"喜欢整洁", | |
"处事小心", | |
"头脑清晰而分析能力强", | |
"能明辨是非", | |
"公平客观", | |
"有正义感", | |
"适应力强", | |
"对美感有鉴赏力", | |
"逻辑强", | |
"善分析", | |
"天生的优雅风采", | |
"浪漫的恋爱高手", | |
"有外交手腕", | |
"因事制宜", | |
"能屈能伸,适应力强", | |
"深谋远虑", | |
"恩怨分明", | |
"直觉敏锐", | |
"对决定的事有执行力", | |
"不畏挫折", | |
"坚持到底", | |
"对朋友讲义气", | |
"具有天生的性感魅力", | |
"坚持追求事情的真相", | |
"善于保守秘密", | |
"对人生有潜在的热情", | |
"有谋略", | |
"富洞悉事物重点的能力", | |
"天生乐观", | |
"对人生充满理想", | |
"正直坦率", | |
"丰富的幽默感", | |
"酷爱和平", | |
"待人友善", | |
"行动力强", | |
"有自己的处世哲学", | |
"经得起打击", | |
"有救世救人的热情", | |
"多才多艺", | |
"有很高的智慧", | |
"颇富直觉", | |
"拥有鼓舞他人的力量", | |
"思想开明", | |
"有很好的判断力", | |
"有处理紧急事务的才能", | |
"擅长哲学思考", | |
"富崇高的正义感", | |
"非常敏感而聪慧", | |
"喜爱自由", | |
"有实际的人生观", | |
"做事脚踏实地", | |
"不容易受影响", | |
"处处谨慎", | |
"有克服困难的毅力", | |
"坚守原则,重视纪律", | |
"有家庭观念", | |
"对人谦逊", | |
"有独树一格的幽默感", | |
"尊敬权威", | |
"看重自己", | |
"崇尚自由", | |
"充满人道精神", | |
"兴趣广泛", | |
"创意十足", | |
"乐於发掘真象", | |
"有前瞻性", | |
"拥有理性的智慧", | |
"有个人风格", | |
"乐於助人", | |
"对自己的感情忠实", | |
"求知欲强", | |
"善於观察", | |
"富有改革精神", | |
"感情丰富", | |
"心地仁慈", | |
"舍己为人", | |
"不自私", | |
"善解人意", | |
"懂得包容", | |
"温和有礼", | |
"容易信赖别人", | |
"不多疑", | |
"温柔而富於直觉", | |
"感情丰富", | |
"富有同情心", | |
"多才多艺", | |
"有许多可以成为优势的能力没有发挥出来,同时也有一些缺点,不过一般可以克服", | |
"与异性交往有些困难,尽管外表上显得很从容,其实内心焦急不安", | |
"有时怀疑自己所做的决定或所做的事是否正确", | |
"喜欢生活有些变化,厌恶被人限制", | |
"以自己能独立思考而自豪,别人的建议如果没有充分的证据不会接受", | |
"认为在别人面前过于坦率地表露自己是不明智的", | |
"有时外向、亲切、好交际,而有时则内向、谨慎、沉默", | |
"有些抱负往往很不现实", | |
"需要别人的喜欢和尊重", | |
"有自我批判的倾向", | |
] | |
ChCount = (5, 7) | |
def shuffleStars(): | |
ShStars = copy.copy(Stars) | |
random.shuffle(ShStars) | |
return ShStars | |
def getChar(star_name, count): | |
Chs = random.sample(Characters, count) | |
for i in range(len(Chs)): | |
Chs[i] = Chs[i].format(star=star_name) | |
return Chs | |
for Star in Stars: | |
StarName = Star + Zuo | |
print(StarName, ":", ",".join(getChar(StarName, random.randint(*ChCount))), | |
"。", sep="") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment