Skip to content

Commit c105f86

Browse files
authored
Update hookes_law.py
1 parent 1a0f353 commit c105f86

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

physics/hookes_law.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"""
1616

1717
def hookes_law(k:float, x:float) ->float:
18-
return round(-k*x, 2)
1918
"""
2019
Calculate the Hookes law from the given values of spring constant 'k'
2120
and the displacement 'x' from the equilibrium position.
@@ -27,6 +26,7 @@ def hookes_law(k:float, x:float) ->float:
2726
>>> hookes_law(300, 3)
2827
-900
2928
"""
29+
return round(-k*x, 2)
3030

3131

3232
if __name__ == "__main__":

0 commit comments

Comments
 (0)