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
Lady bird [3.3K]
2 years ago
5

Suppose we wanted to make change for purchases and wanted to use the least number of coins possible. Here is a greedy algorithm:

for the change amount due, we always use the largest-face-value coin first. Assume we have only coins of quarters ($.25), twenties ($.20), and pennies ($.01). Assume the change is $.40: a. what would be the coins and their numbers obtained by the greedy algorithm above
Computers and Technology
1 answer:
love history [14]2 years ago
5 0

Answer:

Explanation:

The following code is a Python function that takes in the amount of change. Then it uses division and the modulo operator to calculate the number of coins that make up the changes, using the greatest coin values first.

import math

def amountOfCoins(change):

   print("Change: " + str(change))

   quarters = math.floor(change / 0.25)

   change = change % 0.25

   dimes = math.floor(change / 0.20)

   change = change % 0.20

   pennies = math.floor(change / 0.01)

   print("Quarters: " + str(quarters) + "\nDimes: " + str(dimes) + "\nPennies: " + str(pennies))

You might be interested in
1.
natka813 [3]
Its gonna be about 39%.
6 0
3 years ago
The exception of MS Access 2007 and above files is _ and older version are _ files ​
ohaa [14]

Answer:

Never heard of that kind of software, but I think it's an old file.

4 0
2 years ago
WILL GIVE BRAINLIEST!! 20 PNTS!!
kirill [66]

Answer:

B :)

Explanation:

.........

3 0
2 years ago
Read 2 more answers
Your Windows client systems are joined to the WestSim domain. To ensure correct time stamps are used, you need to verify that th
natita [175]

<u>Full question:</u>

Your Windows 7 client systems are joined to the WestSim.com domain. To ensure correct time stamps are used, you need to verify that these clients are configured for the appropriate time zone.

Which command can you use to do this?

• w32tm /tz

• w32tm /monitor

• w32tm /register

• w32tm /query /status

<u>Answer:</u>

w32tm /tz command can you use to do this

<u>Explanation:</u>

W32tm.exe is the approved command-line mechanism for configuring, monitoring, or troubleshooting the Windows Time service. This mechanism is a portion of the default connection between Windows and Windows Server. One can use W32tm.exe to configure Windows Time service settings and to diagnose time setting obstacles.

The syntax is W32tm </parameter> </param2>. w32tm /tz will represent contemporary time zone settings. The Windows Time service is not a full-featured NTP clarification that convenes time-sensitive reinforcement requirements, and it is not verified by Microsoft as such.

6 0
3 years ago
Which pdu is processed when a host computer is de-encapsulating a message at the transport layer of the tcp/ip model?.
yulyashka [42]

The PDU that is processed when a host computer is de-encapsulating a message at the transport layer of the tcp/ip model is segment.

<h3>What is this PDU about?</h3>

Note that in the transport layer, a host computer is said to often de-encapsulate  what we call a segment so that they can be able to put back data to an acceptable or given format through the use of the application layer protocol that belongs to the TCP/IP model.

Therefore, The PDU that is processed when a host computer is de-encapsulating a message at the transport layer of the tcp/ip model is segment as it is the right thing to do.

Learn more about host computer from

brainly.com/question/553980

5 0
2 years ago
Other questions:
  • Ana works in the medical records department at a large medical office. Her job includes scanning and uploading medical records i
    15·1 answer
  • A technology _____ begins with the birth of a new technology and ends when that technology reaches its limits and dies as it is
    13·1 answer
  • All of the following activities may infect your computer with a virus EXCEPT ________.
    6·1 answer
  • If I make a Zoom Meeting, would you join it?
    7·2 answers
  • What is the output of the following program when the method is called with 4?
    11·1 answer
  • ____ is the process of drawing a series of increasingly detailed DFDs, until all functional primitives are identified.
    7·1 answer
  • One of the driving forces in operating system evolution is advancement in the underlying hardware technology.
    8·1 answer
  • My laptop volume has got really low all of a sudden. It wasn't the best to start with but now i can barely even hear it at 100%.
    10·1 answer
  • Rosanna is a middle school teacher. She has installed a spreadsheet program in her computer that tracks the grades and attendanc
    10·1 answer
  • What is the full form of MOS<br>​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!