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

Method cost

Solutions/8_1/stock.py:22–26  ·  view source on GitHub ↗

Return the cost as shares*price

(self)

Source from the content-addressed store, hash-verified

20
21 @property
22 def cost(self):
23 '''
24 Return the cost as shares*price
25 '''
26 return self.shares * self.price
27
28 def sell(self, nshares):
29 '''

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected