From 8c51762e134b1df9896daf98a70a777b53d5d832 Mon Sep 17 00:00:00 2001 From: SmashedFrenzy16 Date: Thu, 3 Oct 2024 14:35:09 +0100 Subject: [PATCH 1/2] Update arc_length.py with diameter usage instead of radius --- maths/arc_length.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maths/arc_length.py b/maths/arc_length.py index 4c518f321dc7..cde6c19f4e5e 100644 --- a/maths/arc_length.py +++ b/maths/arc_length.py @@ -1,7 +1,7 @@ from math import pi -def arc_length(angle: int, radius: int) -> float: +def arc_length(angle: int, diameter: int) -> float: """ >>> arc_length(45, 5) 3.9269908169872414 @@ -10,7 +10,7 @@ def arc_length(angle: int, radius: int) -> float: >>> arc_length(90, 10) 15.707963267948966 """ - return 2 * pi * radius * (angle / 360) + return pi * diameter * (angle / 360) if __name__ == "__main__": From d7af871b9ed58edc90a49bd448f6c55ab45bb1c7 Mon Sep 17 00:00:00 2001 From: SmashedFrenzy16 Date: Sun, 6 Oct 2024 11:18:55 +0100 Subject: [PATCH 2/2] Update arc_length.py --- maths/arc_length.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maths/arc_length.py b/maths/arc_length.py index cde6c19f4e5e..2d0ea2e985c7 100644 --- a/maths/arc_length.py +++ b/maths/arc_length.py @@ -4,11 +4,11 @@ def arc_length(angle: int, diameter: int) -> float: """ >>> arc_length(45, 5) - 3.9269908169872414 + 1.9634954084936207 >>> arc_length(120, 15) - 31.415926535897928 + 15.707963267948964 >>> arc_length(90, 10) - 15.707963267948966 + 7.853981633974483 """ return pi * diameter * (angle / 360)