aboutsummaryrefslogtreecommitdiffstats
path: root/csci1913
diff options
context:
space:
mode:
authorRossTheRoss <mstrapp@protonmail.com>2019-09-12 07:29:37 -0500
committerRossTheRoss <mstrapp@protonmail.com>2019-09-12 07:29:37 -0500
commitfa7bf5f114f812d7e9fe07f5195b7b42c4988f3a (patch)
tree2de6992b6ce767efb6663a26de1eeb6d46fdcd2a /csci1913
parentAlmost done (diff)
downloadhomework-fa7bf5f114f812d7e9fe07f5195b7b42c4988f3a.tar
homework-fa7bf5f114f812d7e9fe07f5195b7b42c4988f3a.tar.gz
homework-fa7bf5f114f812d7e9fe07f5195b7b42c4988f3a.tar.bz2
homework-fa7bf5f114f812d7e9fe07f5195b7b42c4988f3a.tar.lz
homework-fa7bf5f114f812d7e9fe07f5195b7b42c4988f3a.tar.xz
homework-fa7bf5f114f812d7e9fe07f5195b7b42c4988f3a.tar.zst
homework-fa7bf5f114f812d7e9fe07f5195b7b42c4988f3a.zip
finish lab
Diffstat (limited to 'csci1913')
-rw-r--r--csci1913/lab1/lab1_strap012.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/csci1913/lab1/lab1_strap012.py b/csci1913/lab1/lab1_strap012.py
index e04cf82..e7029e1 100644
--- a/csci1913/lab1/lab1_strap012.py
+++ b/csci1913/lab1/lab1_strap012.py
@@ -25,17 +25,16 @@ def solve(v, e):
def solving(v,q):
if left(q)==v:
return q
- elif type(left(left(q))) is not tuple:
+ else:
if op(left(q))=='+':
- return solvingAdd(v, q)
+ newQ = solvingAdd(v, q)
elif op(left(q))=='-':
- return solvingSubtract(v, q)
+ newQ = solvingSubtract(v, q)
elif op(left(q))=='*':
- return solvingMultiply(v, q)
+ newQ = solvingMultiply(v, q)
elif op(left(q))=='/':
- return solvingDivide(v, q)
- else:
- solving(v,left(q))
+ newQ = solvingDivide(v, q)
+ return solving(v,newQ)
def solvingAdd(v,q):
if isInside(v, left(left(q))):