-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfinding_zodiac_sign.py
71 lines (68 loc) · 1.56 KB
/
finding_zodiac_sign.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#finding the zodiac sign
# Write a program that receives the month and date of birth as input and prints the correspondingZodiac sign (Look up the table online). (Should handle the situation where the case (lowercase,uppercase) of the entered birth month does not affect the answer)
print("Enter the month: ")
x=input().lower()
print("Enter the date: ")
y=int(input())
if x=='july' and y<32:
if y>22 :
print("Leo")
else:
print("Cancer")
elif x=='august' and y<32:
if y>22:
print("Virgo")
else :
print("Leo")
elif x=='september' and y<31:
if y>22 :
print("Libra")
else:
print("Virgo")
elif x=='october' and y<32:
if y>22 :
print("Scorpio")
else:
print("Libra")
elif x=='november' and y<31:
if y>21 :
print("Sagittarius")
else:
print("Scorpio")
elif x=='december' and y<32:
if y>21:
print("Capricorn")
else:
print("Sagittarius")
elif x=='january' and y<32:
if y>19:
print("Aquarius")
else:
print("Capricorn")
elif x=='february' and y<29:
if y>18 :
print("Pisces")
else:
print("Aquarius")
elif x=='march' and y<32:
if y>20:
print("Aries")
else:
print("Pisces")
elif x=='april' and y<31:
if y>19:
print("Taurus")
else:
print("Aries")
elif x=='may' and y<32:
if y>20:
print("Gemini")
else:
print("Taurus")
elif x=='june' and y<31:
if y>20:
print("Cancer")
else:
print("Gemini")
else:
print("Invalid input")