Question: Explain line by line. Note: Note that you are expected to submit a single python file. ----------------------------------- Be sure to include your code in a

Explain line by line. Note: Note that you are expected to submit a single python file.

-----------------------------------

Be sure to include your code in a single .py file for all four steps.

1. Write the python script that calculates the total money a customer has to pay in a market according to the prices given as follows: 1 kg apple 14 dolor, 1 kg banana 44 dolar, 1 kg strawberry 60 dolar and 1 kg orange 20 dolar.

If the customer wants to buy more than 10 kilos of each product, he will be able to get the following discounts. If the apple is bought more than 10 kilos, the kilo price will be 10 dolar. If the banana is bought more than 5 kilos, the kilo price will be 42 dolar. If more than 5 kilos of strawberries are bought, the kilo price will be 50 dolar. If the orange is bought more than 10 kilos, the kilo price will be 15 dolar.

After asking the customer how many kilos of each fruit they want to gain, calculate the total amount the customer has to pay. Please check the sample output.

Note: Customers can buy fruit with decimals.

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!