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
Nata [24]
3 years ago
11

4. 15 Exact change (College level not sure why it says middle school)

Computers and Technology
1 answer:
sweet [91]3 years ago
6 0

Answer:

def print_change(total_change):#this is also total cents, because integers don't have decimal points, so I can't use dollars as my unit

dollars = int(total_change / 100)

remaining_change = total_change - dollars * 100

quarters = int(remaining_change / 25)

remaining_change -= quarters * 25

dimes = int(remaining_change / 10)

remaining_change -= dimes * 10

nickels = int(remaining_change / 5)

remaining_change -= nickels * 5

pennies = remaining_change

all = {'dollar': dollars, 'quarter': quarters, 'dime': dimes, 'nickel': nickels, 'penny': pennies}

for num in [0, 1, 2, 3, 4]:

coin_type = list(all.keys())[num]

amount = all[coin_type]

if num < 4 and amount > 1 or amount == 0 and num < 4:

coin_type += 's'

elif num == 4 and amount > 1 or amount == 0 and num == 4:

coin_type = 'pennies'

print('\n', amount, coin_type)

while True:

total_change = int(input()) #in cents

print_change(total_change)

Had fun making this one... hope it helps. :)

You might be interested in
____ technology essentially takes the data to be transmitted and rather than transmitting it in a fixed bandwidth spreads it ove
aleksley [76]

Answer: Spread spectrum

Explanation:

In spread spectrum the data to be transmitted is spread over a wider bandwidth rather than fixed bandwidth.

4 0
3 years ago
If you wanted to find out whether an integer contained an even number of 1 bits, which status flag would be useful
AleksandrR [38]

Answer:

The correct answer will be "Parity".

Explanation:

  • Parity seems to be a methodology that tests when information is transferred or missing or overwritten when something is transferred between one storage location to another, and then it is communicated between processors or devices.
  • It would be used whilst also contrasting the container as well as the aggregated parity to evaluate or dual inspect for inaccuracies.
8 0
3 years ago
Is a MODEM required for Internet Connectivity ?<br> Yes<br> No
Pie

Answer:

you can connect to the wifi on your device it will say you are connected but the wifi will not be connected to the internet so you will be able to do nothing on it without the modem

Explanation:

4 0
3 years ago
Read 2 more answers
Which document would most likely be written in an informal style?
Masteriza [31]

Answer:

An advertisement for sportswear

Explanation:

An advertisement for sportswear would most likely be written in an informal style.

6 0
3 years ago
After this week im gonna be moderator who ever needs help let me know
Sav [38]

Answer:

ok

Explanation:

thanks, for offering help through here. Have a nice day.

4 0
3 years ago
Other questions:
  • Why is it more important now than ever before to know how to evaluate websites and other online sources of information?
    7·1 answer
  • What are the cause of eye strain during computer usage?
    7·1 answer
  • To remove an embedded chart, you should _____ it and press the DELETE key.
    14·2 answers
  • Define a function CoordTransform() that transforms its first two input parameters xVal and yVal into two output parameters xValN
    7·2 answers
  • What type of data can we enter in a spreadsheet?
    11·1 answer
  • Suppose that we can improve the floating point instruction performance of machine by a factor of 15 (the same floating point ins
    13·1 answer
  • Adam is evaluating the security of a web server before it goes live. He believes that an issue in the code allows an SQL injecti
    5·1 answer
  • 9. Which of the following is the<br>leading use of computer?​
    13·1 answer
  • List three ways of breaking a copyright law with the illegal copy of software.​
    11·1 answer
  • Delete temp or %temp% files in Windows 10 is safe and, can it help boost up your PC fps?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!