Question: Write a Python program (shoppingcart.py) that does the following: Print a message that says Welcome to the Healthy Fruits Shop! Print Please enter how many

Write a Python program (shoppingcart.py) that does the following: Print a message that says "Welcome to the Healthy Fruits Shop!" Print "Please enter how many pounds of raspberries you would like to buy ($1.75 per pound):". Store the customer entered value in a variable. Print "Please enter how many pounds of strawberries you would like to buy ($1.25 per pound):". Store the customer entered value in a variable. Print "Please enter how many apples you would like to buy ($0.5 per apple):". Store the customer entered value in a variable. Print "Please enter how many mangoes you would like to buy ($1.75 per mango):". Store the customer entered value in a variable. Compute and display the total owed by the customer. Make sure to round the total to 2 decimal places as this is a monetary amount and not a floating-point amount. Now ask the customer to enter an amount to pay for the fruits and store that value in a variable.

Check to see if the customer entered amount is greater than the amount owed to the store. If not, show a message to the customer and ask them to enter more money. Add the entered money to the previously entered money. If the amount paid is still not enough, ask again for more money. Continue this process until the amount paid is either equal or exceeds the amount owed. Compute and display the change owed to the customer. Now compute the number of $5, $1, quarters, dimes, nickels, and pennies required to return that change to the customer. The store does not give out any higher denominations, such as $10, $20, $50, or $100 bills. Display only the amount of change that must be disbursed to the customer. Test your code using the following test cases: If the total is $14.75 (4.34 lbs. raspberries, 3.2 lbs. strawberries, 2.12 lbs. apples, and 1.2 lbs. mangoes) and the customer gives you $20, then your program must display "The change is $5.25. Give the customer 1 $5 bill, and 1 quarter." If the total is $3.23 (0.9 lbs. raspberries, 0.7 lbs. strawberries, 0.5 lbs. apples, and 0.3 lbs. mangoes) and the customer gives you $20, then your program must display "The change is $16.77. Give the customer 3 $5 bill, 1 $1 bill, 3 quarters, and 2 pennies.

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!