From 69d76244ed279c8e9f4e3c00dd788b0a80826b0d Mon Sep 17 00:00:00 2001 From: Tianyi Zheng Date: Mon, 30 Dec 2024 16:42:52 -0800 Subject: [PATCH] Apply suggestions from code review --- physics/period_of_pendulum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/period_of_pendulum.py b/physics/period_of_pendulum.py index 8a6c05c954f7..6e496a691adb 100644 --- a/physics/period_of_pendulum.py +++ b/physics/period_of_pendulum.py @@ -43,7 +43,7 @@ def period_of_pendulum(length: float) -> float: """ if length < 0: raise ValueError("The length should be non-negative") - return (2 * pi) * (length / g) ** 0.5 + return 2 * pi * (length / g) ** 0.5 if __name__ == "__main__":