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
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