We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a0f353 commit c105f86Copy full SHA for c105f86
1 file changed
physics/hookes_law.py
@@ -15,7 +15,6 @@
15
"""
16
17
def hookes_law(k:float, x:float) ->float:
18
- return round(-k*x, 2)
19
20
Calculate the Hookes law from the given values of spring constant 'k'
21
and the displacement 'x' from the equilibrium position.
@@ -27,6 +26,7 @@ def hookes_law(k:float, x:float) ->float:
27
26
>>> hookes_law(300, 3)
28
-900
29
+ return round(-k*x, 2)
30
31
32
if __name__ == "__main__":
0 commit comments