<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def runcode(code):
 	"""Run the given code line by line with printing, as list of lines, and return variable 'ans'."""

	for line in code:
		print('# '+line)
		exec(line,globals())
	print('# return ans')
	return ans