Иван обнови решението на 02.03.2013 01:32 (преди над 11 години)
+ARIES = (3, range(21, 32)), (4, range(1, 21))
+TAURUS = (4, range(21, 31)), (5, range(1, 21))
+GEMINI = (5, range(21, 32)), (6, range(1, 21))
+CANCER = (6, range(21, 31)), (7, range(1, 22))
+LEO = (7, range(22, 32)), (8, range(1, 23))
+VIRGO = (8, range(23, 32)), (9, range(1, 23))
+LIBRA = (9, range(23, 31)), (10, range(1, 23))
+SKORPION = (10, range(23, 32)), (11, range(1, 22))
+SAGITTARIUS = (11, range(22, 31)), (12, range(1, 22))
+CAPRICORN = (12, range(22, 32)), (1, range(1, 20))
+AQUARIUS = (1, range(20, 32)), (2, range(1, 19))
+PISCES = (2, range(19, 30)), (3, range(1, 21))
+
+ZODIAC = [ARIES, TAURUS, GEMINI, CANCER, LEO, VIRGO, LIBRA,
+ SKORPION, SAGITTARIUS, CAPRICORN, AQUARIUS, PISCES]
+
+ZODIAC_BG = ['Овен', 'Телец', 'Близнаци', 'Рак', 'Лъв', 'Дева', 'Везни',
+ 'Скорпион', 'Стрелец', 'Козирог', 'Водолей', 'Риби']
+
+def satisfied(sign, day, month):
+ if ((sign[0][0] == month and day in sign[0][1]) or
+ (sign[1][0] == month and day in sign[1][1])):
+ return True
+ else:
+ return False
+
+def what_is_my_sign(day, month):
+ for i in range(len(ZODIAC)):
+ if satisfied(ZODIAC[i], day, month):
+ return ZODIAC_BG[i]