︠708982b1-e9ce-4638-a1a0-fbb02247ffa8as︠ #Some basic arithmetic with hints and dynamic feedback:: %auto %exercise k = randint(2,5) title = "Add %s numbers"%k v = [randint(1,10) for _ in range(k)] question = "What is the sum $%s$?"%(' + '.join([str(x) for x in v])) answer = sum(v) hints = ['This is basic arithmetic.', 'The sum is near %s.'%(answer+randint(1,5)), "The answer is %s."%answer] def check(attempt): c = Integer(attempt) - answer if c == 0: return True if abs(c) >= 10: return False, "Gees -- not even close!" if c < 0: return False, "too low" if c > 0: return False, "too high" ︡d95127ed-e51b-49b8-919c-ca8e9e7c57be︡{"interact":{"controls":[{"classes":"btn-large btn-success","control_type":"button","default":" Go ","icon":"fa-refresh","label":"","var":"go","width":null},{"classes":null,"control_type":"text","default":"