Марин обнови решението на 04.03.2013 15:02 (преди над 11 години)
+def what_is_my_sign (day = 1, month = 1):
+ if month == 1 and day >= 1 and day <= 19:
+ print("Козирог")
+ elif month == 1 and day >= 20 and day <= 31:
+ print("Водолей")
+ elif month == 2 and day >= 1 and day <= 18:
+ print("Водолей")
+ elif month == 2 and day >= 19 and day <= 29:
+ print("Риби")
+ elif month == 3 and day >= 1 and day <= 20:
+ print("Риби")
+ elif month == 3 and day >= 21 and day <= 31:
+ print("Овен")
+ elif month == 4 and day >= 1 and day <= 20:
+ print("Овен")
+ elif month == 4 and day >= 21 and day <= 30:
+ print("Телец")
+ elif month == 5 and day >= 1 and day <= 20:
+ print("Телец")
+ elif month == 5 and day >= 21 and day <= 31:
+ print("Близнаци")
+ elif month == 6 and day >= 1 and day <= 20:
+ print("Близнаци")
+ elif month == 6 and day >= 21 and day <= 30:
+ print("Рак")
+ elif month == 7 and day >= 1 and day <= 21:
+ print("Рак")
+ elif month == 7 and day >= 22 and day <= 31:
+ print("Лъв")
+ elif month == 8 and day >= 1 and day <= 22:
+ print("Лъв")
+ elif month == 8 and day >= 23 and day <= 31:
+ print("Дева")
+ elif month == 9 and day >= 1 and day <= 22:
+ print("Дева")
+ elif month == 9 and day >= 23 and day <= 30:
+ print("Везни")
+ elif month == 10 and day >= 1 and day <= 22:
+ print("Везни")
+ elif month == 10 and day >= 23 and day <= 31:
+ print("Скорпион")
+ elif month == 11 and day >= 1 and day <= 21:
+ print("Скорпион")
+ elif month == 11 and day >= 22 and day <= 30:
+ print("Стрелец")
+ elif month == 12 and day >= 1 and day <= 21:
+ print("Стрелец")
+ elif month == 12 and day >= 22 and day <= 31:
+ print("Козирог")
+ else:
+ print("Нема такова животно!")
Не те ли притесняват тези 50 едни и същи реда? Или фактът, че функцията ти не връща нищо?