Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz-course/python-mastery
/ sell
Method
sell
Solutions/8_1/stock.py:15–16 ·
view source on GitHub ↗
(self, nshares)
Source
from the content-addressed store, hash-verified
13
return
self.shares * self.price
14
15
def
sell(self, nshares):
16
self.shares -= nshares
17
18
if
__name__ ==
'__main__'
:
19
from
reader
import
read_csv_as_instances
Callers
1
test_sell
Method · 0.95
Calls
no outgoing calls
Tested by
1
test_sell
Method · 0.76