aboutsummaryrefslogtreecommitdiffstats
path: root/csci1913
diff options
context:
space:
mode:
authorMatthew Strapp <msattr@gmail.com>2019-09-11 15:33:14 -0500
committerMatthew Strapp <msattr@gmail.com>2019-09-11 15:33:14 -0500
commitc8f06d717b204d51196db743b6df6993ea80693b (patch)
tree57f2643b8800844f6780674d5369b9c3ddbf6b21 /csci1913
parentWhy do I even bother (diff)
downloadhomework-c8f06d717b204d51196db743b6df6993ea80693b.tar
homework-c8f06d717b204d51196db743b6df6993ea80693b.tar.gz
homework-c8f06d717b204d51196db743b6df6993ea80693b.tar.bz2
homework-c8f06d717b204d51196db743b6df6993ea80693b.tar.lz
homework-c8f06d717b204d51196db743b6df6993ea80693b.tar.xz
homework-c8f06d717b204d51196db743b6df6993ea80693b.tar.zst
homework-c8f06d717b204d51196db743b6df6993ea80693b.zip
ahhh ah
Diffstat (limited to '')
-rw-r--r--csci1913/lab1/lab1_strap012.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/csci1913/lab1/lab1_strap012.py b/csci1913/lab1/lab1_strap012.py
index 3873ba9..8b8afe4 100644
--- a/csci1913/lab1/lab1_strap012.py
+++ b/csci1913/lab1/lab1_strap012.py
@@ -6,26 +6,28 @@ def right(exp):
return exp[2]
+
def isInside(var, e):
if type(e) is tuple:
return isInside(var, left(e)) or isInside(var, right(e))
elif type(e) is str:
return var==e
-def solve(v, eqn):
- if isInside(v, left(eqn)):
- return solving(v, eqn)
- elif isInside(v,right(eqn)):
- #AHHHH
- return 6
+def solve(v, e):
+ if isInside(v, left(e)):
+ return solving(v, e)
+ elif isInside(v,right(e)):
+ newE=(right(e),exp(e),left(e))
+ return solving(v,newE)
else:
return None
def solving(v,q):
- if v==q:
- return q
+ if type(q) is tuple:
+
+
def solvingAdd(v,q):
- print("Y")
+
#
# TESTS. Test the equation solver for CSci 1913 Lab 1.