Skip to content

codeMuzukashii/evaluate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

evaluate

simple evaluate by python

Rule:

• The function will only handle integer, with range from -2147483648 to 2147483647
• You do not need to handle overflow
• Supported operators “+ - x /” and “()”
• You should not use any 3rd party libraries or the eval() function in python

Sample output:

python evaluate.py “1 + 2 + 3”
6

python evaluate.py “3 * (4 + 3)”
21

python evaluate.py “3 * (4 + 3))”
Invalid expression!

python evaluate.py “1 + 2 3”
Invalid expression!

About

simple evaluate by python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages