Skip to content

Commit

Permalink
change condition in shop class
Browse files Browse the repository at this point in the history
  • Loading branch information
Liliya committed Apr 18, 2024
1 parent f8c86e4 commit b076a5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/shop.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit b076a5b

Please sign in to comment.