Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions

Question

Identify specific IT applications for HR planning.

Answered: 1 week ago