From c420cd1e9b9987e78bb7c984c230489f6900ea0b Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Sun, 21 Feb 2016 15:36:34 +0100 Subject: [PATCH] Updated deriver to python3 --- deriver.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deriver.py b/deriver.py index 359e675..9871cbd 100644 --- a/deriver.py +++ b/deriver.py @@ -310,7 +310,7 @@ class Simplifier: if term.is_constant(): return term.calc() elif isinstance(term,Operator2): - print term.__class__.__name__ + print ( term.__class__.__name__ ) sleft = Simplifier.simplify(term.left) sright = Simplifier.simplify(term.right) @@ -330,13 +330,13 @@ class Simplifier: else: return term -sterm = raw_input("Input term (deriving by x): ") +sterm = input("Input term (deriving by x): ") term = Parser.parse(sterm) -print "Deriving %s" % term +print ( "Deriving %s" % term ) dterm = Deriver.derive(term,"x") -print "DTerm: %s" % dterm +print ( "DTerm: %s" % dterm ) sterm = Simplifier.simplify(dterm) -print "Result: %s" % sterm +print ( "Result: %s" % sterm )