Quick actions

cmd+k|ctrl+k

Navigation

Languages

3.5

Snippet info

Language

Python

Visibility

public

Author

ninhvunguyen

Created

2016-09-21T08:20:46Z

Updated

2016-09-21T08:20:46Z

i = int(input("plz key-in your month in number:"))
print(i)
monthlst = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
for x,y in list(enumerate(monthlst, start=1)):
    if (x == 1 or x == 3 or x == 5 or x == 7 or x == 8 or x == 10 or x == 12) and x == i:
        print(y,"31 days")
    if (x == 4 or x == 6 or x == 9 or x == 11) and x == i:
        print(y,"30 days")
    if x==2 and x == i:
        print(y,"28 days")
INFO