From 4b54d3aba39f6f7bb842bf231069fa5099e95e5c Mon Sep 17 00:00:00 2001 From: Mike Bloy Date: Fri, 11 Aug 2023 11:27:42 -0500 Subject: [PATCH] ex 1.5 --- stock.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 stock.py diff --git a/stock.py b/stock.py new file mode 100644 index 0000000..134d200 --- /dev/null +++ b/stock.py @@ -0,0 +1,9 @@ + +class Stock: + def __init__(self, name, shares, price): + self.name = name + self.shares = shares + self.price = price + + def cost(self): + return self.shares * self.price