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