aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-09-18 12:33:16 -0500
committerRossTheRoss <msattr@gmail.com>2019-09-18 12:33:16 -0500
commitf9cf44d4c8c9806b7f8a31b15bae0ad6bcf6f70b (patch)
treeb422cc23681a02dc31d039916a10b2b11dabaf89
parentMerge branch 'master' of github.com:RosstheRoss/TestingFun (diff)
downloadhomework-f9cf44d4c8c9806b7f8a31b15bae0ad6bcf6f70b.tar
homework-f9cf44d4c8c9806b7f8a31b15bae0ad6bcf6f70b.tar.gz
homework-f9cf44d4c8c9806b7f8a31b15bae0ad6bcf6f70b.tar.bz2
homework-f9cf44d4c8c9806b7f8a31b15bae0ad6bcf6f70b.tar.lz
homework-f9cf44d4c8c9806b7f8a31b15bae0ad6bcf6f70b.tar.xz
homework-f9cf44d4c8c9806b7f8a31b15bae0ad6bcf6f70b.tar.zst
homework-f9cf44d4c8c9806b7f8a31b15bae0ad6bcf6f70b.zip
Fix things
-rw-r--r--csci1913/lab1/lab1_strap012.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/csci1913/lab1/lab1_strap012.py b/csci1913/lab1/lab1_strap012.py
index 582c3be..92975f7 100644
--- a/csci1913/lab1/lab1_strap012.py
+++ b/csci1913/lab1/lab1_strap012.py
@@ -50,14 +50,14 @@ def solvingDivide(v,q):
dispatcher={'+':solvingAdd,'-':solvingSubtract,'*':solvingMultiply,'/':solvingDivide}
def solving(v,q):
-if left(q) is v:
- return q
- else:
- if op(left(q)) in dispatcher:
+ if left(q) is v:
+ return q
+ else:
+ if op(left(q)) in dispatcher:
newQ=dispatcher[op(left(q))](v,q)
- else:
- raise ValueError
- return solving(v,newQ)
+ else:
+ raise ValueError
+ return solving(v,newQ)
#
# TESTS. Test the equation solver for CSci 1913 Lab 1.