Initial commit

This commit is contained in:
David Beazley
2023-07-16 20:21:00 -05:00
parent 82e815fab2
commit 7d4b30154a
259 changed files with 600233 additions and 2 deletions

17
Solutions/6_3/stock.py Normal file
View File

@@ -0,0 +1,17 @@
# stock.py
from structure import Structure
class Stock(Structure):
def __init__(self, name, shares, price):
self._init()
@property
def cost(self):
return self.shares * self.price
def sell(self, nshares):
self.shares -= nshares
Stock.set_fields()