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

Method cost

Solutions/5_8/stock.py:27–31  ·  view source on GitHub ↗

Return the cost as shares*price

(self)

Source from the content-addressed store, hash-verified

25
26 @property
27 def cost(self):
28 '''
29 Return the cost as shares*price
30 '''
31 return self.shares * self.price
32
33 def sell(self, nshares):
34 '''

Callers 1

portfolio_costFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected