LearnPy Hub
← Modules & the Standard Library problems
Hard

How Many Fridays?

Read a year and a month. Using calendar.monthrange (which gives the first weekday and the number of days), print how many Fridays that month has.

Input

Two integers on one line.

Output

One integer.

Sample 1

Input
2026 1
Output
5

Sample 2

Input
2026 2
Output
4
solution.py
Output appears here
How Many Fridays? · Python practice problem · LearnPy Hub