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
Which of the following would not be stored in a cell ?
Andreas93 [3]

Answer:

D

Explanation:

Because you can put formulas, text and numbers into a salad, but you can not put a chart interrupt because it won't fit in a cell.

5 0
3 years ago
____________________ memory is the ability to add RAM without shutting down the computer or operating system.
Liula [17]

Answer:

Hot-add

Explanation:

The computer system is a electronic device that is used to perform computational task on input data for a pre-dertermined result. The components of the computer is divided into hardware and software components.

The hardware components are the physical parts of the computer system, while the software component are the instructions that runs the system.

The RAM is a physical component that provides memory for running current activities on the monitor screen. When it is removed or faulty, the screen goes blank. To add more RAM memory to the system while the system is on, activate the hot-add memory settings.

4 0
3 years ago
Question 8 of 10
Feliz [49]

Answer: B. Multi-user, multitasking.

Explanation:

Multiuser/Multitasking operating system refers to an operating system that's powerful and supports more than one user at a time, and can also perform more than one task at a time.

The operating system allows many users to use the programs which are running concurrently on a single network server. It is the computer operating system that would be best for a large corporation. An example is UNIX.

4 0
3 years ago
Netiquette is the
e-lub [12.9K]

Answer:

C

Correct or acceptable way of communicating

4 0
3 years ago
Given an array of users, write a function, namesAndRoles that returns all of user's names and roles in a string with each value
LenaWriter [7]

Answer:

def namesAndRoles(users):

   for user in users:

       return f"{user[name]}, {user[role]}"

Explanation:

The python program gets the list of dictionaries of the users in a company and returns the user names and their roles. The code is defined as a function and is executed when the function is called.

3 0
3 years ago
Other questions:
  • write a pseudo code and flow chart that take a number as input and prints multiplication table up to 10
    9·1 answer
  • Which of the following statements is true?a. Old paper documents, which were previously only available offline, are increasingly
    10·1 answer
  • Powerpoint provides only three picture effects. true or false.
    5·1 answer
  • Which activity does not allow a person to perform any work while at the shop
    10·1 answer
  • _____ was just a sophomore when he began building computers in his dorm room at the University of Texas. His firm would one day
    14·1 answer
  • Good business ethics is a good marketing strategy. Discuss
    13·1 answer
  • Please tell me which ones go into which categories no files!!
    11·1 answer
  • We begin with a computer implemented in a single-cycle implementation. When the stages are split by functionality, the stages do
    13·1 answer
  • HELP GEKP HELP HELP HELP HELP Cassandra is shooting a photo series in very low light. What kind of lens opening will
    15·1 answer
  • Identify the places in the code where there are object-oriented concept violations, content coupling, common coupling, control c
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!