1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
PtichkaEL [24]
4 years ago
11

You are asked to develop a cash register for a fruit shop that sells oranges and apples. The program will first ask the number o

f customers. Subsequently, for each customer, it will ask the name of the customer and the number of oranges and apples they would like to buy. And then print a summary of what they bought along with the bill as illustrated in the session below: How many customers? 2 Name of Customer 1 Harry Oranges are $1.40 each. How many Oranges? 1 Apples are $.75 each. How many Apples? 2 Harry, you bought 1 Orange(s) and 2 Apple(s). Your bill is $2.9 Name of Customer 2 Sandy Oranges are $1.40 each. How many Oranges? 10 Apples are $.75 each. How many Apples? 4 Sandy, you bought 10 Orange(s) and 4 Apple(s). Your bill is $17.0
Computers and Technology
1 answer:
vaieri [72.5K]4 years ago
5 0

Answer:

customers = int(input("How many customers? "))

for i in range(customers):

   name = input("Name of Customer " + str(i+1) + " ")

   

   print("Oranges are $1.40 each.")

   oranges = int(input("How many Oranges? "))

   

   print("Apples are $.75 each.")

   apples = int(input("How many Apples? "))

   

   bill = oranges * 1.4 + apples * 0.75

   

   print(name + ", you bought " + str(oranges) + " Orange(s) and " + str(apples) + " Apple(s). Your bill is $%.1f" % bill)

Explanation:

*The code is in Python.

Ask the user to enter the number of customers

Create a for loop that iterates for each customer. Inside the loop, ask the user to enter the name, number of oranges, number of apples. Calculate the bill. Print the name, number of oranges, number of apples bought and total bill

You might be interested in
The ampacity of a No. 12 aluminum wire with RHW insulation installed in a raceway that has 19 other wires is
GREYUIT [131]
<span>i believe the answer is C</span>
7 0
4 years ago
This innovator created “honeypots” in which fake accounts are set-up in order to catch cyber criminals.
statuscvo [17]

Answer: A

Explanation:

3 0
4 years ago
Read 2 more answers
Fwee Pwoints Fwor You! :3
Fittoniya [83]

Answer:

Hey thanks for them........

8 0
3 years ago
Read 2 more answers
Ryan wants to connect his flash drive to the computer. Which port should he use?
schepotkina [342]
It is the USB port..............................................  
3 0
3 years ago
Read 2 more answers
Design a 4-bit register that can accept an input from the user and store the accepted input. The 4-bit register will operate in
Digiron [165]

The answer & explanation for this question is given in the attachment below.

4 0
4 years ago
Other questions:
  • Create a single line comment that says ""Print results to screen""
    13·1 answer
  • All of these are required categories on a safety data sheet except
    14·2 answers
  • ) Consider the ambiguous CFG problem: given a context free grammar, does there exist a string that can be generated by two diffe
    5·1 answer
  • Computer user support helps people with minor computer problems. <br><br> True or False
    12·1 answer
  • Decision making process
    15·1 answer
  • The ________ is responsible for the Internet's domain name system and the allocation of IP addresses.
    12·1 answer
  • True false) cad means computer aided manufacturing​
    10·1 answer
  • An application calculates an ending inventory amount based on a beginning inventory amount, sales, and returns. You need to crea
    8·1 answer
  • Which effect is used in this image?
    12·2 answers
  • Write an algorithm to sum all numbers between 0 and 1000 that are divisible by ,7​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!