Jun-05-2017, 02:45 AM
Thanks for the globals advice. I added the calls, found out that it was doing the input() function twice(once for the global and once for the compute() call) and fixed that and found out that the variables don't use the same name across functions, but they do use the same input order.
changing from "num1, num2, var = inputs()"
to "var, num1, num2 = inputs()" always returns "No comprende" because var is first variable pulled by the compute() function, and is a number. Also, fiddling around with if's got different outputs. First, I had to change my statements from add(), etc. to add(num1, num2), etc. Leaving the () empty returned nothing, and the order of what I had in () changed the output. ex: if subtract() was changed to subtract(num1, num2) it returned num1 - num2; but if I changed to subtract(num2, num1) it returned num2 - num1, because the input order for the subtract() function was reversed.
I haven't read through all of the function tutorial in ichabod801's link, so I don't know if that is mentioned there yet.
I think I've gotten everything for this sorted out that I needed. Thanks very much for the help.
changing from "num1, num2, var = inputs()"
to "var, num1, num2 = inputs()" always returns "No comprende" because var is first variable pulled by the compute() function, and is a number. Also, fiddling around with if's got different outputs. First, I had to change my statements from add(), etc. to add(num1, num2), etc. Leaving the () empty returned nothing, and the order of what I had in () changed the output. ex: if subtract() was changed to subtract(num1, num2) it returned num1 - num2; but if I changed to subtract(num2, num1) it returned num2 - num1, because the input order for the subtract() function was reversed.
I haven't read through all of the function tutorial in ichabod801's link, so I don't know if that is mentioned there yet.
I think I've gotten everything for this sorted out that I needed. Thanks very much for the help.