Hackety Hacking Problem Spring Oscillation TernaryOperator

From OLPC
Revision as of 16:28, 9 October 2007 by Anubhavit (talk | contribs) (New page: == Problem Statement == Your physics teacher is teaching you the principles of Oscillations. In a demonstration, She shows you how a spring oscillates. After compressing it to 1cm, accor...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Problem Statement

Your physics teacher is teaching you the principles of Oscillations. In a demonstration, She shows you how a spring oscillates. After compressing it to 1cm, according to Hooke's Law, which is formulated as F = -K*x , the spring starts oscillating. Write a program which could plot the variation of force with change in length of the spring?