From 4d54f9d7238701325be4f967e98ff3fe5c96ee89 Mon Sep 17 00:00:00 2001 From: Debasish Pradhan Date: Sat, 6 Jun 2026 10:59:52 +0530 Subject: [PATCH] Fix time insertion logic to handle overflow Add condition to handle time overflow at 60 minutes. --- Article/PythonBasis/python15/1.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Article/PythonBasis/python15/1.md b/Article/PythonBasis/python15/1.md index 8df266d9..ff0f358f 100644 --- a/Article/PythonBasis/python15/1.md +++ b/Article/PythonBasis/python15/1.md @@ -10,8 +10,11 @@ time = 0 def insert_time(min): - time = time + min - return time + if time == 60: + return 1hr + else: + time = time + min + return time print(insert_time(2)) print(insert_time(10))