Fix print method, generate output

This commit is contained in:
George Lacey 2017-02-09 19:05:32 +00:00
parent 8fc14e1e00
commit 4edf73d674

View File

@ -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):
def set_weight(self, p_weight):
self.weight = p_weight
def output(self):
return self.value * self.weight