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]
4 years ago
11

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

Computers and Technology
1 answer:
sweet [91]4 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
Marisa wants to customize her computer's default firmware. ROM allows data to be changed or modified when necessary.
ludmilkaskok [199]

Answer: ROM stands for "Read-only memory", this is permanent, so false.

4 0
2 years ago
Read 2 more answers
TV stations in the U.S. normally broadcast horizontally-polarized signals. Is this TV antenna mounted correctly, or should it be
Marrrta [24]

Answer:basic computer skills

Explanation:

How to passed my test

3 0
3 years ago
Size of a request header field exceeds server limit.
garri49 [273]
Try to Increase the value for the directive LimitRequestFieldSize in the httpd.conf:


Reason: This is normally caused by having a very large Cookie, so a request header field exceeded the limit set for Web Server.
For IBM® HTTP Server, this limit is set by LimitRequestFieldSize directive (default 8K). The LimitRequestFieldSize directive allows the Web server administrator to reduce or increase the limit on the allowed size of an HTTP request header field.
SPNEGO authentication headers can be up to 12392 bytes. This directive gives the server administrator greater control over abnormal client request behavior, which may be useful for avoiding some forms of denial-of-service attacks.

8 0
3 years ago
Which colour scheme and design elements would you choose for a website for a neighbourhood swim team
ladessa [460]
F this is not related to math I’d pick light blue or a teal blue with either white or gold
7 0
2 years ago
What is operating system?why is it required​
dimulka [17.4K]

Answer:

An operating system is the most important software that runs on a computer. It manages the computer's memory and processes, as well as all of its software and hardware. It also allows you to communicate with the computer without knowing how to speak the computer's language.

Explanation:

Hope this helps :D

7 0
3 years ago
Other questions:
  • In c++
    9·1 answer
  • Jane wants to add a chart to her presentation so she’ll click the Insert tab and in the Images group, she’ll click the Chart but
    5·1 answer
  • To use an ArrayList in your program, you must import:1. the java.collections package2. the java.awt package3. Nothing; the class
    6·1 answer
  • Who innovated an aeroplane? ​
    5·1 answer
  • What can a user modify on a business card using the Edit Business Card dialog box? Check all that apply.
    6·1 answer
  • Why is it important to think about the programming language to use?
    6·1 answer
  • Give two examples of situations or appliance where electrical circuits are used​
    9·1 answer
  • Draw the 2-3 tree that results when you insert the keys E A S Y Q U T I O N in that order into an initially empty tree
    12·1 answer
  • Scripting languages are unique computer languages with a specialized function. explain what scripting languages do, and how this
    7·1 answer
  • Write an SQL statement to show the sum of SubTotal for each customer. List CustomerID, LastName, FirstName, Phone, and the calcu
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!