Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help specifically with computing the number of bills and coins to give back to the customer. This is what I have so far.

I need help specifically with computing the number of bills and coins to give back to the customer. This is what I have so far. I am a beginner at python so please code as if you were a beginner. Thank you image text in transcribed
image text in transcribed
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 (81.25 per pound): . Store the customer entered value in a variable. Print "Please enter how many apples you would like to buy (so.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. . Now ask the customer to enter an amount to pay for the fruits and vegetables and store tht 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. Compute and Display the change owed to the customer Now comp pute the number of $5. S1, quarters, dimes, nickels, and pennies required to return that change to the customer. Display only the amount of change that must be disbursed to the customer. Here are some test cases s$14.75andthe customer gives you $2o, then your program must display "The change is $5.25. Give the customer fthe total 1 $5 note, and 1 quarter." o If the total is $33.35 and the customer gives you $40, then your program must display "The change is $6.65, Give the customer 1 $5 note, 1 $ note, 2 quarters, i dime, and nickel. shoppingcart.py print("Welcome to Healthy Fruits Shop!" rasberries- float (input("Please enter how many rasberries you would like to buy($1.75 per pound):")) strawberries float (input("Please enter how many pounds of strawberries you would like to buy ($1.25 per pound):)) apples- float(input("Please enter how many apples you would like to buy ($8.5 per apple):")) mangoes float(input("Please enter how many mangoes you would like to buy ($1.75 per mango):") total- float (rasberries 1.75)+ (strawberries 1.25)+ (apples 0.5)+(mangoes 1.75) print("Total-s", total) amount-float (input("Please enter the amount due:s ")) w while amount

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

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago