mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
Update greedy.py (#1832)
This commit is contained in:
parent
6043a44ffb
commit
f35484baf6
|
@ -1,8 +1,8 @@
|
|||
class things:
|
||||
def __init__(self, n, v, w):
|
||||
self.name = n
|
||||
self.value = v
|
||||
self.weight = w
|
||||
def __init__(self, name, value, weight):
|
||||
self.name = name
|
||||
self.value = value
|
||||
self.weight = weight
|
||||
|
||||
def __repr__(self):
|
||||
return f"{self.__class__.__name__}({self.name}, {self.value}, {self.weight})"
|
||||
|
|
Loading…
Reference in New Issue
Block a user