Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz-course/python-mastery
/ sell
Method
sell
Solutions/6_4/stock.py:12–13 ·
view source on GitHub ↗
(self, nshares)
Source
from the content-addressed store, hash-verified
10
return
self.shares * self.price
11
12
def
sell(self, nshares):
13
self.shares -= nshares
14
15
Stock.create_init()
16
Callers
1
test_sell
Method · 0.95
Calls
no outgoing calls
Tested by
1
test_sell
Method · 0.76