Skip to content

SubatomicPlanets/SimpleStringMath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

StrToMath

This is an example on how to evaluate a mathematical expression from a string.
You can use this file as a python library if you want to.
Currently only + - * / ^ are possible. I will add more in the future.
If there are any issues, please let me know. I did not have a lot of time for testing.

examples:

"what's 53+7*6/2 ?" -> 74
"what is 9 * 67+90?" -> 693
"2^7" -> 128