''' Solves the hanoi towers riddle. Uses the algorithm described in the Skillz's MOOC. ''' left = " " #The moves needed to move the discs to the left right = " " #The moves needed to move the discs to the right discs = int(input("How many discs? ")) for i in range(1, discs+1): newleft = right + str(i) + "<" + right #A temp. variable used to keep left unchanged right = "" #Your code here. Replace the 0 with the right expression left = "" #Your code here. Replace the 0 with the right expression print("To move left " + str(discs) + " discs:") print(left) print("To move right " + str(discs) + " discs:") print(right)