bobflipperdoodle at gmail.com bobflipperdoodle at gmail.com
Wed Dec 26 22:40:25 CET 2012

I really hope you can help!

I need to create a program where the user can order any combination and quantity of 3 products. I then offer a 10% discount if the customer correctly answers a trivia question.  After that, there are 3 choices for shipping.

I have most of the program completed but I'm struggling with the most important parts :/  I get the total of multiple orders of the same item, but we can't figure out how to total the entire order - before discounts and shipping - and then where to put any code referring back to the trivia question. Can somebody please help me with this? I would really appreciate it!

This is the code:

shop_again = 'y'

print("Welcome to the Star Wars Shop!")
customer = eval(input("Is there a customer in line? (1 = yes, 2 = no)> "))
while shop_again == 'y':
if (customer == 2):
print("Welcome to the Star Wars Memorabilia Shop!")
customer = eval(input("Is there a customer in line? (1 = yes, 2 = no)> "))

elif (customer == 1):
print("Please select an item to update your order and any other number to check out.")
print("Yoda Figure: \$10 each.")
print("Star Wars Movie DVD: \$20 each.")
print("Death Star Lego Set: \$200 each.")
print(" 1 for Yoda Figure")
print(" 2 for Star Wars Movie DVD")
print(" 3 for Death Star Lego Set")
order = eval(input("Order: "))

if (order == 1):
yoda = eval(input("How many Yoda Figures do you want? : "))
total = 10 * yoda
print("Total:", total)
print("Current order:", yoda, "at", total)
if (order == 2):
movie = eval(input("How many Star Wars Movie DVDs do you want? : "))
total = 20 * movie
print("Total:", total)
print("Current order:", movie, "at", total)
if (order == 3):
legos = eval(input("How many Death Star Lego Sets do you want? : "))
total = 200 * legos
print("Total:", total)
print("Current order:", legos, "at", total)

shop_again = input("Would you like to keep shopping? 'Y' for yes, 'N' for no: ")
print()
print("Your order before shipping and discounts: ",total)
print()
print("Answer a trivia question for a discount!")
discount = eval(input("On what planet did Yoda live when Luke Skywalker first met him? 1) Earth 2) Dagobah 3) Pluto :"))
if (discount == 1):
if (discount == 2):
print("That's correct, you get a 10% discount!")
if (discount == 3):
print()
if (discount == 2):
(total * .9)

print("1) Regular Shipping: 3-4 business days, \$5.00 per \$50 ordered. 2) Express Shipping: overnight, \$10 per \$50 ordered. 3) Super Saver Shipping: 7-10 business days, free.")
shipping = eval(input("Please select the shipping method you want: "))

if (shipping == 1):

total == total % 50
total == total * 5
if (shipping == 2):
total == total/50
total == total % 50
total == total * 10