From 335aa89957fdbe540dfcb3ab7c7c12e14551b4dd Mon Sep 17 00:00:00 2001 From: thirdr Date: Tue, 22 Jul 2025 09:45:34 +0100 Subject: [PATCH] word_clock.py: fix hour showing incorrectly when minutes zero --- examples/word_clock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/word_clock.py b/examples/word_clock.py index 0d32eb3..1dba294 100644 --- a/examples/word_clock.py +++ b/examples/word_clock.py @@ -66,7 +66,7 @@ def approx_time(hours, minutes): if hours == 12: hours = 0 - if minutes > 0 and minutes < 8: + if minutes >= 0 and minutes < 8: return "it is about " + nums[hours] + " O'Clock" elif minutes >= 8 and minutes < 23: return "it is about quarter past " + nums[hours]