Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Start/Ch 1/challenge.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
# of "Ticker: Company -- $Price"

class Stock:
pass
def __init__(self, ticker, price, company):
self.ticker = ticker
self.price = price
self.company = company

def get_description(self):
return f"{self.ticker}: {self.company} -- {self.price}"

# ~~~~~~~~~ TEST CODE ~~~~~~~~~
msft = Stock("MSFT", 342.0, "Microsoft Corp")
Expand Down