aboutsummaryrefslogtreecommitdiffstats
path: root/csci1913/lab1
diff options
context:
space:
mode:
Diffstat (limited to '')
-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.