# Well done! Play with Sage and have fun with math. if true: 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 true: factor(2016) # 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: # See if you can change this line to make activate the indented code below. a, b = var('a, b') for p in range(4): ((a + b)^p).expand()