Skip to content

Commit 723cc86

Browse files
authored
Update hookes_law.py
1 parent 074967b commit 723cc86

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

physics/hookes_law.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
is not exceeded.
66
Formulae : F = -k*x
77
F: Force
8-
k: Spring constant
9-
x: displacement from the equilibrium position
8+
k: spring constant
9+
x: displacement
10+
x is the displacement from the equilibrium position
1011
The negative sign indicates that the restoring force acts in the opposite
1112
direction to the displacement, always working to bring the object back to
1213
its original state.
1314
Reference: https://en.wikipedia.org/wiki/Hooke%27s_law
1415
"""
1516

1617

17-
def hookes_law(k: float, x: float) -> float:
18+
def hookes_law(spring_contant: float, displacement: float) -> float:
1819
"""
1920
Calculate the Hookes law from the given values of spring constant 'k'
2021
and the displacement 'x' from the equilibrium position.

0 commit comments

Comments
 (0)