; Example queries and results for Physics rat% clojure Clojure 1.10.0 user=> (load-file "cs378/physics.clj") #'user/load-files user=> (load-files) #'user/testall user=> (load-file "cs378/physgramsol.clj") #'user/testall user=> (gramcom grammar) nil user=> (testall) (what is the area of a circle with radius = 2) (calculate area (object circle (radius 2))) 12.566370614 (what is the radius of a sphere with volume = 50) (calculate radius (object sphere (volume 50))) 2.2853907486921896 (what is the height of a fall with time = 4) (calculate height (object fall (time 4))) 78.4532 (what is the power of a lift with mass = 50 and height = 10 and time = 5) (calculate power (object lift (mass 50) (height 10) (time 5))) 980.665 (what is the area of a circle with radius = 30 inches) (calculate area (object circle (radius 0.762))) 1.8241469246988542 (what is the area in square-inches of a circle with radius 0.5 m) (calculate (* area 6.4516E-4) (object circle (radius 0.5))) 1217.369587970426 (what is the power in horsepower of a lift with mass = 50 and height = 10 and time = 5) (calculate (* power 745.69987) (object lift (mass 50) (height 10) (time 5))) 1.3150934302831512 (how does the area of a circle vary with radius) (varywith circle area radius) square (how does the force of gravitation vary with radius) (varywith gravitation force radius) inverse-square (how does the area of a circle vary if radius is doubled) (varychg circle area ((radius 2.0))) 4.0 (how does the area of a circle vary if radius is 1.5 times its previous value) (varychg circle area ((radius 1.5))) 2.25 (what is the velocity in miles per hour of a fall with time = 4 sec) (calculate (* velocity 0.44704) (object fall (time 4.0))) 87.74740515390121