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
1. What makes discrimination different from harassment? (Don't give me definitions.)
-BARSIC- [3]
Discrimination includes acting against a race whereas harassment isn’t not allowing a race to do something but instead insulting them. For example not giving someone of a certain race a job is discrimination but if someone followed a person of another race down the street calling them rude names, that’s harassment
7 0
3 years ago
My name Jeff <br><br> what movie is this off of
Zielflug [23.3K]

Answer:

there is no movie name off of

4 0
3 years ago
Read 2 more answers
Carol typed a memo to send to everyone in her department. To create this memo, she used a _____.
aleksley [76]

she used a word processor

8 0
4 years ago
Read 2 more answers
What shortcut keys do i use to print something on my keyboard ?
romanna [79]
CTRL+P. It's usually pressed when you want to print something.
5 0
3 years ago
Read 2 more answers
Describing light years
kogti [31]

Answer:

For most space objects, we use light-years to describe their distance. A light-year is the distance light travels in one Earth year. One light-year is about 6 trillion miles (9 trillion km). That is a 6 with 12 zeros behind it!

5 0
3 years ago
Other questions:
  • Write a program totake a depth (in kilometers) inside the earth as input data;compute
    15·1 answer
  • One of the most famous ___ licenses is gpl, which ensures that a particular program remains free to distribute and allows its co
    10·1 answer
  • How do you measure objects and re-size them in tinkercad? I need it in steps.
    7·1 answer
  • 1. compression
    11·1 answer
  • Create a pseudocode program that asks students to enter a word. Call a function to compute the different ways in which the lette
    9·1 answer
  • A system administrator is selecting an operating system for use by the company’s research and development team. The team require
    15·1 answer
  • Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has three links, of rates R1 = 500 kbps, R2
    14·1 answer
  • Ujqwgydft frrhyy4e uvbw vhrwbhv vbyrewblv?
    14·1 answer
  • How to program a game​
    7·2 answers
  • Science Help
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!