I want my program to do this:
Input formula:
(2*(3+4)-5)/6
Output answer of formula:
1.5
Is there anyway to do it? I can't find anything from the Internet. Asking here is my last attempt.
I want my program to do this:
Input formula:
(2*(3+4)-5)/6
Output answer of formula:
1.5
Is there anyway to do it? I can't find anything from the Internet. Asking here is my last attempt.
you can use eval
>>> a = eval('(2*(3+4)-5)/6')
>>> print(a)
1.5