Here is my solution for the Daily Coding Challenge 50

Write a function to evaluate an arithmetic expression in the form of a binary search tree

**example**

```
*
/
+ +
/ /
3 2 4 5
Back >> 45
```

Is this the most efficient way to do this?

```
"" Create an operation tree and calculate the result.
Class Tree:
def __init __ (self, value, left = None, right = None):
Initialize values
self.value = value
self.left = left
self.right = correct
def detect_sum (self, total):
if self.left == None and self.right == None:
return int (self.value)
if self.value == "*":
total + = self.left.determine_sum (total) * self.right.determine_sum (total)
if self.value == "+":
total + = self.left.determine_sum (total) + self.right.determine_sum (total)
if self.value == "-":
total + = self.left.determine_sum (total) - self.right.determine_sum (total)
if self.value == "/":
total + = self.left.determine_sum (total) / self.right.determine_sum (total)
total return
if __name__ == "__main__": #
n = tree ("*")
n.left = tree ("+")
n.right = tree ("+")
n.left.right = tree ("+")
n.right.right = tree ("+")
n.left.left = tree ("3")
n.left.right.left = tree ("4")
n.left.right.right = tree ("5")
n.right.left = tree ("6")
n.right.right.left = tree ("7")
n.right.right.right = tree ("4")
sum = n.determine_sum (0)
print (sum)
```