-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonths.py
More file actions
33 lines (31 loc) · 925 Bytes
/
months.py
File metadata and controls
33 lines (31 loc) · 925 Bytes
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
'''
User gives a month number and our program tells the number of days in that month.
'''
month_number = int(input("Give a number of a month (1-12):"))
match month_number:
case 1:
print("There are 31 days in January")
case 2:
print("There are 28 days in February")
case 3:
print("There are 31 days in March")
case 4:
print("There are 30 days in April")
case 5:
print("There are 31 days in May")
case 6:
print("There are 30 days in June")
case 7:
print("There are 31 days in July")
case 8:
print("There are 31 days in August")
case 9:
print("There are 30 days in September")
case 10:
print("There are 31 days in October")
case 11:
print("There are 30 days in November")
case 12:
print("There are 31 days in December")
case _:
print("You didn't giva a correct number.")