From a02e1f780be58cb20020016bbb3ebe67ec4b568e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 01:46:45 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- maths/seconds_time_conversion.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/maths/seconds_time_conversion.py b/maths/seconds_time_conversion.py index 218e611e1..45de0e685 100644 --- a/maths/seconds_time_conversion.py +++ b/maths/seconds_time_conversion.py @@ -1,4 +1,4 @@ -def time_conversion(sec:int) -> int: +def time_conversion(sec: int) -> int: """ This simple python program converts seconds to days, hours, minutes and seconds @@ -25,9 +25,13 @@ def time_conversion(sec:int) -> int: return days, hours, minutes, seconds + if __name__ == "__main__": import doctest + doctest.testmod() - seconds = 256 #assign the input here - print(f"{time_conversion(seconds)[0]} days {time_conversion(seconds)[1]} hours\ - {time_conversion(seconds)[2]} minutes {time_conversion(seconds)[3]} seconds") \ No newline at end of file + seconds = 256 # assign the input here + print( + f"{time_conversion(seconds)[0]} days {time_conversion(seconds)[1]} hours\ + {time_conversion(seconds)[2]} minutes {time_conversion(seconds)[3]} seconds" + )