Николина обнови решението на 11.03.2015 08:25 (преди над 9 години)
+year = input("Enter a year:")
+day = input("Enter a day: ")
+month = input("Enter a month: ")
+year = int(year)
+
+def interpret_western_sign(day,month):
+
+ if (int(month) == 3 and int(day) <= 21) or (int(month) == 4 and int(day) <= 20):
+ return "aries"
+ elif (int(month) == 4 and int(day) <= 21) or (int(month) == 5 and int(day) <= 20):
+ return("taurus")
+ elif (int(month) == 5 and int(day) <= 21) or (int(month) == 6 and int(day) <= 20):
+ return("gemini")
+ elif (int(month) == 6 and int(day) <= 21) or (int(month) == 7 and int(day) <= 22):
+ return("cancer")
+ elif (int(month) == 7 and int(day) <= 23) or (int(month) == 8 and int(day) <= 22):
+ return("leo")
+ elif (int(month) == 8 and int(day) <= 23) or (int(month) == 9 and int(day) <= 22):
+ return("virgo")
+ elif (int(month) == 9 and int(day) <= 23) or (int(month) == 10 and int(day) <= 22):
+ return("libra")
+ elif (int(month) == 10 and int(day) <= 23) or (int(month) == 11 and int(day) <= 21):
+ return("scorpio")
+ elif (int(month) == 11 and int(day) <= 22) or (int(month) == 12 and int(day) <= 21):
+ return("sagittarius")
+ elif (int(month) == 12 and int(day) <= 22) or (int(month) == 1 and int(day) <= 20):
+ return("capricorn")
+ elif (int(month) == 1 and int(day) <= 21) or (int(month) == 2 and int(day) <= 19):
+ return("aquarius")
+ elif (int(month) == 2 and int(day) <= 19) or (int(month) == 3 and int(day) <= 20):
+ return("pisces")
+
+
+def interpret_chinese_sign(year):
+ year = int(year)
+
+ if year % 12 == 0:
+ return ("monkey")
+
+ elif year % 12 == 1:
+ return ("rooster")
+
+ elif year % 12 == 2:
+ return ("fog")
+
+ elif year % 12 == 3:
+ return ("pig")
+
+ elif year % 12 == 4:
+ return ("rat")
+
+ elif year % 12 == 5:
+ return ("ox")
+
+ elif year % 12 == 6:
+ return ("tiger")
+
+ elif year % 12 == 7:
+ return ("rabbit")
+
+ elif year % 12 == 8:
+ return ("dragon")
+
+ elif year % 12 == 9:
+ return ("snake")
+
+ elif year % 12 == 10:
+ return ("horse")
+
+ else:
+ return ("sheep")
+
+def interpret_both_signs(day, month, year):
+ x = (interpret_western_sign(day,month), interpret_chinese_sign(year))
+
+ return x
+
+
+print (interpret_both_signs(day, month, year))
- тестовете извикват функциите ви с различни аргумемти, а в твоя случай
input
-а чупи всичко, защото тестовете са автоматични иняма@ да се въвеждат данни от stdin -
print
-овете са напълно безполезни в решенията ви