Question: After the program ends, the following output will be present: Oranges are 1.4 each. Apples are $ 0.75 each. Harry , you bought 1 Oranges

After the program ends, the following output will be present: Oranges are 1.4 each. Apples are $ 0.75 each. Harry , you bought 1 Oranges and 2 Apples. Your bill is $ 2.9 Sandy , you bought 10 Oranges and 4 Apples. Your bill is $ 17.0 Store shutting down

Q-2a [20 pts] You are asked to develop a cash register for a fruit shop that sells oranges and apples. The program first asks the name of the shopowner, and the price of oranges and apples. Subsequently, the program will repeatedly ask the name of the customer and the number of oranges and apples they would like to buy. Then, print a summary of what they bought along with the bill, as illustrated in the session below. The program will stop when the shopowner's name is entered. Program prompts: Hi Fruit Seller, what is your name? User types: Naumi Program prompts: What is the price of an Orange today? User types: 1.40 Program prompts: What is the price of an Apple today? User types: 9.75 Program outputs: Oranges are $ 1.4 each. Apples are $ @.75 each. Program prompts: Who is the next customer? User types: Harry Program prompts: How many Oranges? User types: 1 Program prompts: How many Apples? User types: 2 Program outputs: Harry , you bought 1 Oranges and 2 Apples. Your bill is $ 2.9 Program Prompts: Who is the next customer? User types: Sandy Program Prompts: How many Oranges? User types: 10 Program Prompts: How many Apples? User types: 4 Program outputs: Sandy , you bought 1@ Oranges and 4 Apples. Your bill is $ 17.0 Program Prompts: Who is the next customer? User types: Naumi Program outputs: Store shutting down

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