Skip to content

Commit 1682ad4

Browse files
Update escape_velocity.py
1 parent ad97a08 commit 1682ad4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

physics/escape_velocity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ def escape_velocity(mass: float, radius: float) -> float:
3939
...
4040
ZeroDivisionError: Radius cannot be zero.
4141
"""
42-
GRAVITATIONAL_CONSTANT = 6.67430e-11 # m^3 kg^-1 s^-2
42+
gravitational_constant = 6.67430e-11 # m^3 kg^-1 s^-2
4343

4444
if radius == 0:
4545
raise ZeroDivisionError("Radius cannot be zero.")
4646

47-
velocity = math.sqrt(2 * GRAVITATIONAL_CONSTANT * mass / radius)
47+
velocity = math.sqrt(2 * gravitational_constant * mass / radius)
4848
return round(velocity, 3)
4949

5050

0 commit comments

Comments
 (0)