Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
22 views
# Well done! Play with Sage and have fun with math. if 1: guess, value = var('guess, value') g = 42 v = 43 percentError(guess, value) = abs((guess - value)/value)*100 print ("{:.3f}%".format(float(percentError(g, v)))) if false: 2016.factor() # In Pyhon, the language of SageMath, 1 = true, 0 = false # Numers that are not zero are also interperted as true. if 1: print ("Math = Phun") if 0: a, b = var('a, b') for p in range(4): ((a + b)^p).expand()
2.326% Math = Phun