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
A website that allows anyone with access to add new material and edit existing materials is referred to as a​ _________. A. data
nataly862011 [7]

Answer:

C. wiki

Explanation:

5 0
4 years ago
Read 2 more answers
Which of these is one of the primary concerns for protecting your family when online?
Lady_Fox [76]
Sharing personal information
7 0
3 years ago
Read 2 more answers
Please its argent and I will give you BRAINLIEST ANSWER 6. How would you confirm that a colourless liquid given to you is pure w
xz_007 [3.2K]

Answer:

Evaporate the colourless liquid on a low flame. If no residue is left and boiling exactly at 100 ºC then it is pure water otherwise not.

Explanation:

6 0
3 years ago
Ryan has made a presentation of ten slides, which he wants to display in sequence after a specific time interval. Which element
Sonja [21]
It's called transition or effects lol
7 0
4 years ago
Read 2 more answers
Hi finish this lyric for 100 hundred points choke me like now you
melamori03 [73]
Uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
7 0
3 years ago
Read 2 more answers
Other questions:
  • 1. What does it mean to say that a country’s land area is positively correlated with its population?
    12·2 answers
  • PLEASE HELP ME ASP!!!
    11·2 answers
  • Question 3.3. Which of the following is NOT a computer protocol? FTP SMTP ISP TCP
    11·1 answer
  • Which of the following statements about certificates is true?
    14·2 answers
  • The small company where you work needs to implement a second server for its accounting system, but does not have the funds to pu
    11·1 answer
  • C++ please
    8·1 answer
  • 2.20 Write an expression involving a three-letter string s that evaluates to a string whose characters are the characters of s i
    6·1 answer
  • Points! taga pilipinas ba kayo?​
    10·1 answer
  • Assume that x is a char variable that has been declared and already given a value. Write an expression whose value is true if an
    6·1 answer
  • 3.4 code practice question 2 edhesive
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!