combo1_price = item1_price + item2_price - combo_discount * (item1_price + item2_price)
combo2_price = item2_price + item3_price - combo_discount * (item2_price + item3_price)
combo3_price = item1_price + item3_price - combo_discount * (item1_price + item3_price)
combo4_price = item1_price + item2_price + item3_price -
giftpack_discount * (item1_price + item2_price + item3_price)
dash_rule = '- ' * 20
line_rule = '-' * 40
print("Online Store")
print(dash_rule)
print(
f"{'Product(s)':<30}{'Price':>10}",
f"\n{'Item 1':<30}{item1_price:>10}",
f"\n{'Item 2':<30}{item2_price:>10}",
f"\n{'Item 3':<30}{item3_price:>10}",
f"\n{'Combo 1 (item 1 + 2)':<30}{combo1_price:>10}",
f"\n{'Combo 2 (item 2 + 3)':<30}{combo2_price:>10}",
f"\n{'Combo 3 (item 1 + 3)':<30}{combo3_price:>10}",
f"\n{'Combo 4 (item 1 + 2 + 3)':<30}{combo4_price:>10}",
)
print(line_rule)
print("For delivery Contact: 98764678899")
Output of the code:
Online Store
- - - - - - - - - - - - - - - - - - - - Product(s) Price