You will write functions for the spring constant of two springs together, and for the period of a block on them.
The idea. Springs side by side, in parallel, add their spring constants. Springs end to end, in series, add the inverses of their spring constants. A block of mass on a spring of has .
Your tasks.
parallel, return the spring constant of two springs side by side.series, return the spring constant of two springs end to end.period, return the period of a block of mass m on a spring of k.piece, return the spring constant of a piece cut from a spring of k, when the piece is the fraction part of the length.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…