From ef4992152d7077e8714296e2eeb3dce08ecd6023 Mon Sep 17 00:00:00 2001 From: Jason Ji Date: Sun, 24 Sep 2017 18:25:22 -0700 Subject: [PATCH] fixed? --- app/stock.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/stock.py b/app/stock.py index ce6bb875..fa2da4d7 100644 --- a/app/stock.py +++ b/app/stock.py @@ -16,6 +16,6 @@ def get_stock(share_name): share = yahoo_finance.Share(share_name) open_price = share.get_open() curr_price = share.get_price() - change = curr_price - open_price - return '```Stock: {}\n\nOpen: ${}\nCurrently: ${}\nChange:```'.format( - share_name.upper(), open_price, curr_price) + change = float(curr_price) - float(open_price) + return '```Stock: {}\n\nOpen: ${}\nCurrently: ${}\nChange: ${}```'.format( + share_name.upper(), open_price, curr_price, change)