Python/maths/arc_length.py
Guduly 672e7bde2e
Update arc_length.py ()
* Update arc_length.py

Wrote the output of testcase

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update arc_length.py

Added the requested changes

* Update arc_length.py

followed the change request

* Update arc_length.py

followed suggestions

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-20 16:39:29 -07:00

18 lines
340 B
Python

from math import pi
def arc_length(angle: int, radius: int) -> float:
"""
>>> arc_length(45, 5)
3.9269908169872414
>>> arc_length(120, 15)
31.415926535897928
>>> arc_length(90, 10)
15.707963267948966
"""
return 2 * pi * radius * (angle / 360)
if __name__ == "__main__":
print(arc_length(90, 10))