From 6814aaedb09243d677c5862b22cd201d1c4af974 Mon Sep 17 00:00:00 2001 From: "Dobbertin, Niclas" Date: Tue, 16 Apr 2024 03:52:52 +0200 Subject: print final result --- modeling/productions_math.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'modeling/productions_math.py') diff --git a/modeling/productions_math.py b/modeling/productions_math.py index c8dfc8e..93c7762 100644 --- a/modeling/productions_math.py +++ b/modeling/productions_math.py @@ -197,6 +197,15 @@ x = Model.simulation() x.run() print("goal: ", goal) print("imaginal: ", imaginal) +# imaginal.show("hundreds_ans") +# imaginal.show("tens_ans") +# imaginal.show("ones_ans") +result_ones = str(getattr(imaginal._data.copy().pop(), "ones_ans")) +result_tens = str(getattr(imaginal._data.copy().pop(), "tens_ans")) +result_huns = str(getattr(imaginal._data.copy().pop(), "hundreds_ans")) + +result_num = result_huns + result_tens + result_ones +print(result_num) # print(list(DM)) numbers = [x for x in list(DM) if x.typename != "number" and x.typename != "math_op"] numbers = [x for x in list(DM) if x.typename != "number" and x.typename == "math_op"] -- cgit v1.2.3