repl.it
@TonySiu/

mastering python fundamentals

Python

No description

fork
loading
Files
  • main.py
main.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
import calendar 
import datetime

#print(calendar.weekheader(4))

#print(calendar.firstweekday())

print(calendar.month(2019,8, 3))

print(calendar.monthcalendar(2019,8))

print(calendar.calendar(2019, 3))

day_of_the_week = calendar.weekday(2019, 3 , 8)
print(day_of_the_week)

is_leap = calendar.isleap(2020)
print(is_leap)

how_many_leap_day = calendar.leapdays(2000,2009)
print(how_many_leap_day)





months = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'Semptember', 'Ocatober', 'November', 'December']

month_number = range(1,13)


for i, month in zip(month_number, months):
    print(month)
    print(calendar.monthcalendar(2019,i))
    print('\n')