Question
The website manyhats.com sells baseball hats. Hats are $ 8.00 each and the shipping charge is calculated as follows. Number of hats Shipping Charge Fewer
The website manyhats.com sells baseball hats. Hats are $ 8.00 each and the shipping charge is calculated as follows. Number of hats Shipping Charge
Fewer than 10 hats - $2.0 per hat
More or equal to 10 hats, but less than 25 hats - $40.0
More or equal to 25 hats - $35.0
Example: An order of 15 hats is 15*8.00 = 120.00 for the hats, plus 40.00 for shipping, so the order total is $160.00. Write a function called order_total that takes the number of hats (say num) as the input parameter and returns the total cost of an order, including shipping using the scenario given in above table. In the same file, write Python statements to take the number of hats from user and display the total cost by using order_total function. A simple interaction should look like this, where responses entered by the user are in bold. How many hats? Your order total is $160.0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started