Commit 5ebd7983 authored by Roberts Ivanovs's avatar Roberts Ivanovs

Updated readme and example on calculator_tree

parent 6ad9d2b8
Pipeline #528 canceled with stages
To run tests: `python test_calculator_tree.py`
Main code resides in `tree_traversing.py`
Main function that can calculate the strings: `calculate(string)`
\ No newline at end of file
Main function that can calculate the strings: `calculate(string)`
e.g
`calculate(-4-7*3).calculate_below()` will result in `-25`
\ No newline at end of file
......@@ -109,4 +109,4 @@ def calculate(expr, binary_tree=None):
if __name__ == "__main__":
expression = "-4-7*3"
print(calculate(expression))
print(calculate(expression).calculate_below())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment