python根据出生年份计算生肖的代码,看了代码才发现原来这么简单
#计算生肖
def ChineseZodiac(year):
return u'猴鸡狗猪鼠牛虎兔龙蛇马羊'[year%12]
ChineseZodiac(1990)
python根据出生年份计算生肖的代码,看了代码才发现原来这么简单
#计算生肖
def ChineseZodiac(year):
return u'猴鸡狗猪鼠牛虎兔龙蛇马羊'[year%12]
ChineseZodiac(1990)