code: def runcode(code):
  	
  	for line in code:
  		print('# '+line)
  		exec(line,globals())
  	print('# return ans')
  	return ans
docs: Run the given code line by line with printing, as list of lines, and return variable 'ans'.