What is the probability (across all years) that Christmas falls on a Wednesday?
7% 14%
29% 14.25%
58% 14.2̅8̅5̅7̅1̅4̅% (1/7)
7% 14.5%
90 votes • Final results
2
1
1
5
14% for Sunday and Friday, 14.5% for Monday, Thursday and Saturday, 14.25% for Tuesday and Wednesday.
1
I think you have an off-by-one error somewhere. (Also, you're giving it away. :-)
1
Guess where the off-by-one comes... python's time.struct_time's tm_wday has Monday=0 vs. C's struct tm's tm_wday has Sunday=0... docs.python.org/3/library/ti… highlights the difference for months... but not week days...
1
1
Replying to @MikeHommey
Sometimes bash is the right tool: $ for ((YEAR=2000; $YEAR < 2400; YEAR=$YEAR + 1)); do date --date="$YEAR-12-25 12:00" +"%w %a"; done | sort | uniq -c 58 0 Sun 56 1 Mon 58 2 Tue 57 3 Wed 57 4 Thu 58 5 Fri 56 6 Sat

Dec 19, 2019 · 3:03 AM UTC

1