Factor evalCode so drawAnswer and execute can use the same code.