A
A
asb-kapusta2020-07-16 16:12:51
Python
asb-kapusta, 2020-07-16 16:12:51

How to perform an arithmetic operation on user input?

There is input: The user enters, for example: 12 + 4 * 8 How to display the answer of this example?
a = input(">>> ")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Fedoryan, 2020-07-16
@asb-kapusta

Everything is simple
Parser of mathematical expressions
Algorithm for parsing arithmetic expressions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question