Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
27 views
# well done! Now take sage for a spin. # let v = speed (velocity without direction) # let d = distance (that which is measured by a car's odominer) # let t = time (that whihc is measured by periodic motion such as the small glass crystal vibrating in most digital clocks) d, v, t = var('distance, speed, time') symbolList = {v, d, t} speedTimeDistanceEqn = d == v*t eqn = speedTimeDistanceEqn eqn.solve(v) view(eqn.solve(v)) print ("now that we fiqured out how to\n solve and display\n for one symbol in or motion equation\n we can\n use Python to solve and display\n every symbol in our list.\n\n\nLet us give it a go!\n") for item in symbolList: print (speedTimeDistanceEqn.solve(item)) # print is good because it shows the multipliaction symbol view (speedTimeDistanceEqn.solve(item)) # view is good because it looks pretty print ("another way to print all the solutions (Python is fun):") print (tuple(speedTimeDistanceEqn.solve(item) for item in symbolList))