From 4edf73d6741c053283c3b4ca9624d42a1039dcdf Mon Sep 17 00:00:00 2001 From: George Lacey Date: Thu, 9 Feb 2017 19:05:32 +0000 Subject: [PATCH] Fix print method, generate output --- Input.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Input.py b/Input.py index ae7c255..1f1c49c 100644 --- a/Input.py +++ b/Input.py @@ -5,7 +5,10 @@ class Input(object): self.weight = p_weight def print(self): - print("value: %f\nweight: %f") % (self.value, self.weight) + print("value: %f\tweight: %f" % (self.value, self.weight)) - def setweight(self, p_weight): - self.weight = p_weight \ No newline at end of file + def set_weight(self, p_weight): + self.weight = p_weight + + def output(self): + return self.value * self.weight