Question: Write Python code for the following task: Ask for total amount for an online shopping order and calculate the shipping cost based on the following

Write Python code for the following task:

Ask for total amount for an online shopping order and calculate the shipping cost based on the following table. Also, calculate the total cost (order amount + shipping cost). Of course, one must also ask for the destination location (within USA or Canada). If the total input order is 0 or less or it is more than $10,000, display an error message and do not perform any calculation. Issue an error message, if the destination is not one of USA or Canada. When comparing the country values, dont worry about looking for the case of the entry. You can assume that the valid country values are USA and Canada. So, if the user enters Canada (all lower case), this is considered to be an invalid destination. Make sure to format the amount of shipping cost to 2 digits after the decimal point.

Order Total Ship Amount within USA Ship to Canada
0 to less than $50 $6 $8
$50 to less than $100 $9 $12
$100 to less than $150.00 $12 $15
$150 or more 0 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!