Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # shipping constatns
- shipping_usa1 = float(6.00)
- shipping_usa2 = float(9.00)
- shipping_usa3 = float(12.00)
- shipping_canada1 = float(8.00)
- shipping_canada2 = float(12.00)
- shipping_canada3 = float(15.00)
- shipping_cost_print = float()
- #Get input
- item_name = str (input("Please enter the item name: "))
- fragle = str (input("is the item fragle? y/n: "))
- total = float (input("Please enter your order total: $ "))
- destination =str (input("Please enter the destination: usa/can "))
- #Figure out if's going to usa or can
- if destination == ("usa"):
- if total <= 50.00:
- total += shipping_usa1
- shipping_cost_print = shipping_usa1
- elif total >50.01 and total <=100.00 :
- total += shipping_usa2
- shipping_cost_print = shipping_usa2
- elif total >100.01 and total <=150.00 :
- total += shipping_usa3
- shipping_cost_print = shipping_usa3
- elif total >=150.01:
- total += 0.00
- shipping_cost_print = 0.00
- if destination == ("can"):
- if total <= 50.00:
- total += shipping_canada1
- shipping_cost_print = shipping_canada1
- elif total >50.01 and total <=100.00 :
- total += shipping_canada2
- shipping_cost_print = shipping_canada2
- elif total >100.01 and total <=150.00 :
- total += shipping_canada3
- shipping_cost_print = shipping_canada3
- elif total >=150.01:
- total += 0.00
- shipping_cost_print = 0.00
- # if orde is fragle add 2.00
- if fragle == ('y'):
- total += (2.00)
- print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
- print("your order is: ", item_name)
- print("Your shipping cost is: ", '{0:.2f}'.format(shipping_cost_print))
- print("You are shipping to: ", destination)
- print("Your total shipping cost is ",'{0:.2f}'.format(total))
- print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
- print("Thank you for your order.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement