From 93dd09bf8f80b378cb9bf990e71ba0c8c5fe57ff Mon Sep 17 00:00:00 2001 From: Stefano Agnelli Date: Fri, 29 Mar 2024 00:19:49 +0100 Subject: [PATCH] added m1-002 exercise --- projects/m1/002-bottle-deposits/python/main.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/projects/m1/002-bottle-deposits/python/main.py b/projects/m1/002-bottle-deposits/python/main.py index e69de29bb..10aaaa754 100644 --- a/projects/m1/002-bottle-deposits/python/main.py +++ b/projects/m1/002-bottle-deposits/python/main.py @@ -0,0 +1,12 @@ +value_small = 0.10 +value_big = 0.25 + + +print("How many small cans do you have?") +number_small = int(input()) + +print("How many big cans do you have?") +number_big = int(input()) + +refund = number_small*value_small + number_big*value_big +print("Your refund is: " + str(round(refund , 2)) + "$") # ALTERNATIVE print("Your refund is: " + "%.2f" % refund + "$") \ No newline at end of file