Math quiz code for python