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
gladu [14]
3 years ago
12

Your local Publixsupermarket is reprogramming their cash registersand you are their software developer. The machine will output

the amount of change that must be given to the customerbroken down into each coin. Write a program that asks the user to entertheir name as well as theamount of change in CENTS. The program shouldthenoutput the amount of half dollars,quarters, dimes, nickels, and pennies to be returned to the customer (in that order) to arrive at the total amount of change inputted by the customer.
Computers and Technology
1 answer:
Verdich [7]3 years ago
7 0

Answer:

name = input("Enter name: ")

change = float(input("Enter change in cents: "))

half_dollars = int(change / 50)

change %= 50

quarters = int(change / 25)

change %= 25

dimes = int(change / 10)

change %= 10

nickels = int(change / 5)

change %= 5

pennies = int(change)

print("Half dollars: " + str(half_dollars) + ", Quarters: " + str(quarters) + ", Dimes: " + str(dimes) + ", Nickels: " + str(nickels) + ", Pennies: " + str(pennies))

Explanation:

*The code is in Python.

Ask the user to enter the name and change in cents

Calculate the number of half dollars, quarters, dimes, nickels, and pennies, use division and modulo operator

Print the results

Let me demonstrate calculating the half_dollars:

Let's say the user enter 134 for the change.

half_dollars = int(change / 50) → int(134/50) → int(2.68) = 2

change %= 50 (same as change = change % 50) → 134 % 50 → 34

You might be interested in
You decide to add 3 new hard drives to your computer so that you can increase the amount of storage one it when you install them
Tasya [4]

Answer:

b. Use a Molex to SATA power adapter.

Explanation:

SATA power connector is a 15 pin power connector that is used to connect many computer parts like hard drive, cd drive, SSD, etc.

Molex connector is an old connector that is used as a power connector instead of a SATA connector on the same devices.

But the SATA connector overcomes the Molex connectors as it is easy to use and easy to install and can widely be used in many peripherals.

But even now power supply of the computer contains the SATA power connector as well as some spare Molex connector, which can be used when required.  

There are many Molex to SATA connectors that are easy to use when there is a shortage of SATA power.

So, according to the scenario, the most appropriate answer is option b.

3 0
3 years ago
17. Ano ang tawag sa pahina ng Excel?
kompoz [17]

D

Explanation:

D.spread sheet

........,,............:-)

5 0
3 years ago
Mike Reid is on the analysis phase of a project which is developing smile shutter cameras.
zavuch27 [327]

Answer:

The correct answer to the following question will be Option C (requirement analysis).

Explanation:

This is the mechanism of identifying the clients' requirements for such an application or framework to be constructed or updated.

  • It includes almost all of the activities accomplished to determine the expectations of the various stakeholders.
  • The methodology of parameters consequently involves the analysis, reporting, testing, and management of software or program specifications.

The other three options are not related to the given scenario. So that Option C is the right answer.

8 0
3 years ago
Suppose we have a 4096 byte byte-addressable memory that is 32-way high-order interleaved, what is the size of the memory addres
iogann1982 [59]

Answer:

7

Explanation:

Given that :

Byte-addressable memory = 4096

Order = 32

Rwqritying such that they have the same base ;

4096 = 2^12

32 = 2^5

2^12 - 2^5

12 - 5 = 7

4 0
3 years ago
All slide layouts have a content placeholder.
Mars2501 [29]
True, but the only way to get these constant place holders is of you program them in, in other words you have to tell the computer that you want them.
8 0
3 years ago
Other questions:
  • You have been hired to set up a network for XYZ Enterprises. What factors will you consider to determine the type of network nee
    7·2 answers
  • Where would you go to add fractions to a document in adobe indesign
    5·1 answer
  • What can be designed to create annoying glitches or destroy data
    15·2 answers
  • Which philosopher believed that if we carefully examine the contents of our experience, we find that there are only two distinct
    10·1 answer
  • An abstract method ____.
    6·1 answer
  • Help with computer. homework
    15·1 answer
  • 8.9 Code Practice
    11·2 answers
  • If a priority queue is being implemented using an unordered list, what is the Big-O complexity of the Enqueue operation?
    14·1 answer
  • Which are the following 4 things something must be able to do in order to be a computer? *
    9·1 answer
  • open your browser and enter the address of this ftp site in the address box: ftp.cengage. if your browser supports ftp, a logon
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!