0
How can I execute an equation with several different symbols in my calculator?
I am making a simple calculator, one that only adds, subtracts,divides, multiplies, finds the square root, and find whatever exponent equation you need. However, I can not figure out how to execute an equation with several different symbols in it, like this one: 4+8-3 How would I incorporate such a feature into my code? If you need to look at it, you can find my current code here: https://code.sololearn.com/c0yoGqbZ5fKx/?ref=app
2 Answers
+ 4
Python lets you do it shorter in one line
print (eval (input())) // sth like that don't remember)
But if you want create you own expression counter see SoloLearn's programming tasks. There should be task about your question (and explanations too)