What this does is asks you for the first digit and sets (var) digit1 to your answer. Then, it asks for the operator, and it sets (var) operator to your answer. Then, finally, it asks for your final digit. It sets (var) digit2 to your answer. Then, it uses the operators to solve your math problem which gets the results returned to you in the (list) result. Also, if you type invalid characters, it will set your result at the end to nothing or 0. (depends on if you make the operator valid or not.)
100% by @-Voxel- (me).