MCPcopy Create free account
hub / github.com/dabeaz-course/python-mastery / cost

Method cost

Solutions/7_6/stock.py:11–12  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9
10 @property
11 def cost(self):
12 return self.shares * self.price
13
14 def sell(self, nshares: PositiveInteger):
15 self.shares -= nshares

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected