← Back to challenges

Friday the 13th

PythonHarddateslanguage_fundamentalsvalidation

Instructions

Given the month and year as numbers, return whether that month contains a Friday 13th.

Examples

has_friday_13(3, 2020) ➞ True

has_friday_13(10, 2017) ➞ True

has_friday_13(1, 1985) ➞ False

Notes

  • January will be given as 1, February as 2, etc ...
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.