Дияна обнови решението на 08.03.2015 23:14 (преди над 9 години)
+zodiac= {
+ 1: 20*["capricorn"]+11*["aquarius"],
+ 2: 18*["aquarius"]+ 11*["pisces"],
+ 3: 20*["pisces"]+11*["aries"],
+ 4: 20*["aries"]+10*["taurus"],
+ 5: 20*["taurus"]+11*["gemini"],
+ 6: 20*["gemini"]+10*["cancer"],
+ 7: 22*["cancer"]+9*["leo"],
+ 8: 22*["leo"]+9*["virgo"],
+ 9: 22*["virgo"]+8*["libra"],
+ 10: 22*["libra"]+9*["scorpio"],
+ 11: 21*["scorpio"]+9*["sagittarius"],
+ 12: 21*["sagittarius"]+10*["capricorn"]
+}
+def interpret_western_sign(day, month):
+ return zodiac[month][day-1]
+
+chinese={
+ 0:'monkey',
+ 1:'rooster',
+ 2:'dog',
+ 3:'pig',
+ 4:'rat',
+ 5:'ox',
+ 6:'tiger',
+ 7:'rabbit',
+ 8:'dragon',
+ 9:'snake',
+ 10:'horse',
+ 11:'sheep'
+}
+
+def interpret_chinese_sign(year):
+ return chinese[year%12]
+
+def interpret_both_signs(day, month, year):
+ return interpret_western_sign(day, month), interpret_chinese_sign(year)
Чете ли pep8 преди да предадеш? Поне оправи интервалите за идентация.