- numpy - matplotlib Physim

Hooke's Law

In this section you will practice and apply what you have learned from the Hooke's Law simulations, creating a calculator to calculate the spring force given an position change and an spring constant and understanding the calculations being done.


If you are looking for a reference for Python consider looking at the Python Reference Sheet on the site.



Below are sample runs of some of the outputs you should get when running the program.


Hooke's Law


For user input k = 0.13 and x = 15.4, the output should be:


For user input k = 0.02 and x = -10.2, the output should be:


For user input k = 10.7 and x = -20.9, the output should be:


For user input k = 0.00 and x = 11.3, the output should be:


For user input k = 0.27 and x = 0.0, the output should be:



Here is a code editor so that you can compute your calculator program.


# insert your code here


Go Back to Force Exercises Page