From 3b622e0158e7fdd6e81fca6a33e96429eeec027f Mon Sep 17 00:00:00 2001 From: Logen Kain Date: Mon, 14 Sep 2020 16:36:56 -0400 Subject: [PATCH] Add $ symbol to prices --- cost-of-smokes.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cost-of-smokes.py b/cost-of-smokes.py index 14ad2d4..cce6c5e 100644 --- a/cost-of-smokes.py +++ b/cost-of-smokes.py @@ -27,7 +27,7 @@ while True: break -print("Your cigarettes cost", format(cost/20, '.2f'), "each") +print("Your cigarettes cost $" + format(cost/20, '.2f'), "each") print() print("You smoke: ") @@ -39,8 +39,8 @@ print(math.ceil(20 * packs * 365), "per year") print() print("This costs you: ") -print(format(cost * packs, '.2f'), "Per day") -print(format(cost * packs * 7, '.2f'), "per week") -print(format((cost * packs * 365)/12, '.2f'), "per month") -print(format(cost * packs * 365, '.2f'), "per year") +print("$" + format(cost * packs, '.2f'), "Per day") +print("$" + format(cost * packs * 7, '.2f'), "per week") +print("$" + format((cost * packs * 365)/12, '.2f'), "per month") +print("$" + format(cost * packs * 365, '.2f'), "per year")