4. DiscountsΒΆ

from banco import *
from fatec import *

items = ["Sfiha","Cocina","Pastel","Pan de queso"]
prices = [1.50,2.20,1.80,1.20]
running = True

while running:
   option = 1
   for choice in items:
      print(str(option) + "." + choice)
      option += 1
   print(str(option) + ".Finish")
   choice = int(input("Choose an option"))
   if choice == option:
      # Chose the last option - "Finish"
      running = False
   else:
      card_number = input("Credit card number: ")
      price = discount(prices[choice-1])
      save_transaction(price, card_number, items[choice-1])
You have attempted of activities on this page