Решение на Хороскоп от Марина Узунова

Обратно към всички решения

Към профила на Марина Узунова

Резултати

  • 6 точки от тестове
  • 0 бонус точки
  • 6 точки общо
  • 15 успешни тест(а)
  • 0 неуспешни тест(а)

Код

def what_is_my_sign(day, month):
if month == 1:
if day >= 1 and day <= 19:
return "Козирог"
elif day >= 20 and day <= 31:
return "Водолей"
if month == 2:
if day >= 1 and day <= 18:
return "Водолей"
elif day >= 19 and day <= 29:
return "Риби"
if month == 3:
if day >= 1 and day <= 20:
return "Риби"
elif day >= 21 and day <= 31:
return "Овен"
if month == 4:
if day >= 1 and day <= 20:
return "Овен"
elif day >= 21 and day <= 30:
return "Телец"
if month == 5:
if day >= 1 and day <= 20:
return "Телец"
elif day >= 21 and day <= 31:
return "Близнаци"
if month == 6:
if day >= 1 and day <= 20:
return "Близнаци"
elif day >= 21 and day <= 30:
return "Рак"
if month == 7:
if day >= 1 and day <= 21:
return "Рак"
elif day >= 22 and day <= 31:
return "Лъв"
if month == 8:
if day >= 1 and day <= 22:
return "Лъв"
elif day >= 23 and day <= 31:
return "Дева"
if month == 9:
if day >= 1 and day <= 22:
return "Дева"
elif day >= 23 and day <= 30:
return "Везни"
if month == 10:
if day >= 1 and day <= 22:
return "Везни"
elif day >= 23 and day <= 31:
return "Скорпион"
if month == 11:
if day >= 1 and day <= 21:
return "Скорпион"
elif day >= 22 and day <= 30:
return "Стрелец"
if month == 12:
if day >= 1 and day <= 21:
return "Стрелец"
elif day >= 22 and day <= 31:
return "Козирог"

Лог от изпълнението

...............
----------------------------------------------------------------------
Ran 15 tests in 0.001s

OK

История (2 версии и 2 коментара)

Марина обнови решението на 02.03.2013 20:05 (преди над 11 години)

+def what_is_my_sign(day, month):
+ if month == 1:
+ if day >= 0 and day <= 19:
+ return "Козирог"
+ elif day >= 20 and day <= 31:
+ return "Водолей"
+ if month == 2:
+ if day >=0 and day <= 18:
+ return "Водолей"
+ elif day >= 19 and day <= 29:
+ return "Риби"
+ if month == 3:
+ if day >= 0 and day <= 20:
+ return "Риби"
+ elif day >= 21 and day <= 31:
+ return "Овен"
+ if month == 4:
+ if day >= 0 and day <= 20:
+ return "Овен"
+ elif day >= 21 and day <= 30:
+ return "Телец"
+ if month == 5:
+ if day >= 0 and day <= 20:
+ return "Телец"
+ elif day >= 21 and day <= 31:
+ return "Близнаци"
+ if month == 6:
+ if day >= 0 and day <= 20:
+ return "Близнаци"
+ elif day >= 21 and day <= 30:
+ return "Рак"
+ if month == 7:
+ if day >= 0 and day <= 21:
+ return "Рак"
+ elif day >= 22 and day <= 31:
+ return "Лъв"
+ if month == 8:
+ if day >= 0 and day <= 22:
+ return "Лъв"
+ elif day >= 23 and day <= 31:
+ return "Дева"
+ if month == 9:
+ if day >= 0 and day <= 22:
+ return "Дева"
+ elif day >= 23 and day <= 30:
+ return "Везни"
+ if month == 10:
+ if day >= 0 and day <= 22:
+ return "Везни"
+ elif day >= 23 and day <= 31:
+ return "Скорпион"
+ if month == 11:
+ if day >= 0 and day <= 21:
+ return "Скорпион"
+ elif day >= 22 and day <= 30:
+ return "Стрелец"
+ if month == 12:
+ if day >= 0 and day <= 21:
+ return "Стрелец"
+ elif day >= 22 and day <= 31:
+ return "Козирог"

Марина обнови решението на 04.03.2013 00:56 (преди над 11 години)

def what_is_my_sign(day, month):
if month == 1:
- if day >= 0 and day <= 19:
+ if day >= 1 and day <= 19:
return "Козирог"
elif day >= 20 and day <= 31:
return "Водолей"
if month == 2:
- if day >=0 and day <= 18:
+ if day >= 1 and day <= 18:
return "Водолей"
elif day >= 19 and day <= 29:
return "Риби"
if month == 3:
- if day >= 0 and day <= 20:
+ if day >= 1 and day <= 20:
return "Риби"
elif day >= 21 and day <= 31:
return "Овен"
if month == 4:
- if day >= 0 and day <= 20:
+ if day >= 1 and day <= 20:
return "Овен"
elif day >= 21 and day <= 30:
return "Телец"
if month == 5:
- if day >= 0 and day <= 20:
+ if day >= 1 and day <= 20:
return "Телец"
elif day >= 21 and day <= 31:
return "Близнаци"
if month == 6:
- if day >= 0 and day <= 20:
+ if day >= 1 and day <= 20:
return "Близнаци"
elif day >= 21 and day <= 30:
return "Рак"
if month == 7:
- if day >= 0 and day <= 21:
+ if day >= 1 and day <= 21:
return "Рак"
elif day >= 22 and day <= 31:
return "Лъв"
if month == 8:
- if day >= 0 and day <= 22:
+ if day >= 1 and day <= 22:
return "Лъв"
elif day >= 23 and day <= 31:
return "Дева"
if month == 9:
- if day >= 0 and day <= 22:
+ if day >= 1 and day <= 22:
return "Дева"
elif day >= 23 and day <= 30:
return "Везни"
if month == 10:
- if day >= 0 and day <= 22:
+ if day >= 1 and day <= 22:
return "Везни"
elif day >= 23 and day <= 31:
return "Скорпион"
if month == 11:
- if day >= 0 and day <= 21:
+ if day >= 1 and day <= 21:
return "Скорпион"
elif day >= 22 and day <= 30:
return "Стрелец"
if month == 12:
- if day >= 0 and day <= 21:
+ if day >= 1 and day <= 21:
return "Стрелец"
elif day >= 22 and day <= 31:
return "Козирог"