November 2015
Intermediate to advanced
129 pages
2h 36m
English
Here are suggested solutions for the études. Of course, your solutions may well be entirely different, and better.
(nsformulas.core(:require[clojure.browser.repl:asrepl]))(defonceconn(repl/connect"http://localhost:9000/repl"))(enable-console-print!)(defndistance"Calculate distance traveled by an object movingwith a given acceleration for a given amount of time"[acceltime](*acceltimetime))(defnkinetic-energy"Calculate kinetic energy given mass and velocity"[mv](/(*mvv)2.0))(defncentripetal"Calculate centripetal acceleration given velocity and radius"[vr](/(*vv)r))(defnaverage"Calculate average of two numbers"[ab](/(+ab)2.0))(defnvariance"Calculate variance of two numbers"[ab](-(*2(+(*aa)(*bb)))(*(+ab)(+ab))))
(defG6.6784e-11)(defngravitational-force"Calculate gravitational force of two objects ofmass m1 and m2, with centers of gravity at a distance r"[m1m2r](/(*Gm1m2)(*rr)))
(defnmonthly-payment"Calculate monthly payment on a loan of amount p,with annual percentage rate apr, and a given number of years"[papryears](let[r(/(/apr100)12.0)n(*years12)factor(.powjs/Math(+1r)n)](*p(/(*rfactor)(-factor1)))))
(defnradians"Convert degrees to radians"[degrees](*(/(.-PIjs/Math)180)degrees))(defndaylight"Find minutes of daylight given latitude in degrees and day of year.
Read now
Unlock full access