Fix print method, generate output
This commit is contained in:
parent
8fc14e1e00
commit
4edf73d674
7
Input.py
7
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):
|
||||
def set_weight(self, p_weight):
|
||||
self.weight = p_weight
|
||||
|
||||
def output(self):
|
||||
return self.value * self.weight
|
||||
|
|
Loading…
Reference in New Issue
Block a user