Unlucky Years

Published by Joshua Señoron in

Create a function which returns how many Friday 13ths there are in a given year.

Examples

how_unlucky(2020) ➞ 2

how_unlucky(2026) ➞ 3

how_unlucky(2016) ➞ 1

Notes

Check Resources for some helpful tutorials on the Python datetime module.

Watch a quick demo on how Edabit works.