diff --git a/app/shop.py b/app/shop.py index 1bd758af..0260b2b4 100644 --- a/app/shop.py +++ b/app/shop.py @@ -26,7 +26,7 @@ def bill(self, customer_name: str, products_needed: dict) -> str: * self.shop_products[product] ) total_amount += total_for_product - if str(total_for_product)[-2:] == ".0": + if total_for_product == int(total_for_product): total_for_product = int(total_for_product) out += (f"{products_needed[product]} {product}s " f"for {total_for_product} dollars\n")