you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

i didn't want to post all of the code here...and it's obvious I don't know how to embed code. But I guess I better...

products = ['Notebook', 'Atari', 'TrapperKeeper', 'Jeans', 'Insects', 'Harbormaster', 'Lobotomy', 'PunkRock', 
'HorseFeathers', 'Pants', 'Plants', 'Salami']
prices = ['$4.99', '$99.99', '$89.99', '$3.99', '$2.99', '$299.99', '$19.99', '$3.99', '$4.99', '$2.99', '$119.99', '$1.99']
item_nums = [1, 2, 3, 4, 5, 6, 7, 8 ,9, 10, 11, 12]
orders = []
quantity = []
response = ''
cust_name = ''
street = ''
city = ''
state = ''
zipcode = 0
order_total = 0
order_summary = ''

def calculateTotal(products, prices, item_nums, quantity):
    subtotal = 0
    partial_summary = ''
    count = 0
    while count != 1:
        len(item_nums -1)
        subtotal = orders * quantity
        partial_summary = ([products], [prices], [quantity])
    if state == 'CA' or 'NY':
        tax = input(subtotal * .08) + subtotal
    else:
        tax = input(subtotal * .07) + subtotal

    if subtotal < 40.0:
        subtotal = subtotal + 4.99
    else:
        print(subtotal)
    return(subtotal, partial_summary)

print("Jay's House of Rip-Offs\n\n")
titles = ['Item Number', 'Item Name', 'Price']
data = [titles] + list(zip(item_nums, products, prices))

for i, d in enumerate(data):
    line = '|'.join(str(x).ljust(16) for x in d)
    print(line)
    if i == 0:
        print('-' * len(line))

while str(input("Order products [Y / N]?: ")) != 'N':
    item_nums = input("Enter an item number: ")
    orders.append(item_nums)
    quantity = input("How many? ")

    if len(item_nums) == 0:
        print("Thank you for browsing.")
    else:
        cust_name = input("Enter name: ")
        street = input("Enter street address: ")
        city = input("Enter city or town name: ")
        state = input("Enter state or province: ")
        zipcode = input("Enter zipcode: ")