Иван обнови решението на 03.03.2013 22:51 (преди почти 12 години)
+def what_is_my_sign(day, month):
+ if month == 12 and day in range(22,31+1) or month == 1 and day in range(1,19+1):
+ print("Козирог")
+ elif month == 1 and day in range(20,31+1) or month == 2 and day in range(1,18+1):
+ print("Водолей")
+ elif month == 2 and day in range(19,29+1) or month == 3 and day in range(1,20+1):
+ print("Риби")
+ elif month == 3 and day in range(21,31+1) or month == 4 and day in range(1,20+1):
+ print("Овен")
+ elif month == 4 and day in range(21,30+1) or month == 5 and day in range(1,20+1):
+ print("Телец")
+ elif month == 5 and day in range(21,31+1) or month == 6 and day in range(1,20+1):
+ print("'Близнаци'")
+ elif month == 6 and day in range(21,30+1) or month == 7 and day in range(1,21+1):
+ print("Рак")
+ elif month == 7 and day in range(22,31+1) or month == 8 and day in range(1,22+1):
+ print("Лъв")
+ elif month == 8 and day in range(23,31+1) or month == 9 and day in range(1,22+1):
+ print("Дева")
+ elif month == 9 and day in range(23,30+1) or month == 10 and day in range(1,22+1):
+ print("Везни")
+ elif month == 10 and day in range(23,31+1) or month == 11 and day in range(1,21+1):
+ print("Скорпион")
+ elif month == 11 and day in range(22,30+1) or month == 12 and day in range(1,21+1):
+ print("Стрелец")
+ else:
+ print("Няма такава дата, пич!")
Пусни си тестовете. Функцията ти не връща нищо. Да не говорим, че има ужасно много повторения и проверка за невалиден input.