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
Ludmilka [50]
3 years ago
15

Write a program with total change amount as an integer input that outputs the change using the fewest coins, one coin type per l

ine. The coin types are dollars, quarters, dimes, nickels, and pennies. Use singular and plural coin names as appropriate, like 1 penny vs. 2 pennies. Ex: If the input is: 0 or less, the output is: no change Ex: If the input is: 45 the output is: 1 quarter 2 dimes Your program must define and call the following function. Positions 0-4 of coinVals should contain the number of dollars, quarters, dimes, nickels, and pennies, respectively. void ExactChange(int userTotal, vector& coinVals) Note: This is a lab from a previous chapter that now requires the use of a function.
Computers and Technology
1 answer:
Svetllana [295]3 years ago
7 0

Answer:

see explaination

Explanation:

quarter = 25

dime = 10

nickel = 5

penny = 1

total_amount = int(input("enter an amount\n"))

if total_amount == 0:

print('No Change')

else:

Q = int (total_amount / quarter)

total_amount = total_amount % quarter

D = int (total_amount / dime)

total_amount = total_amount % dime

N = int (total_amount / nickel)

total_amount = total_amount % nickel

P = int (total_amount / penny)

print("your change will be\n",Q,'quarter\n',D,'dime\n',N,'nickel\n',P,'penny')

You might be interested in
Can someone help me to write a python code to save list form python to CSV file please?​
lianna [129]

f = open("MyFileName.csv", "w")

lst = ["Hello", "Hi", "Bye"]

f.write(str(lst))

f.close()

I didn't necessarily know what you meant by list form. This program works for me in pycharm. I had to install the CSV plugin though. If you encounter any errors, I'll try my best to help you.

8 0
3 years ago
Your company is getting negative feedback on the current customer service process. It’s your job to make sure customers are happ
Andru [333]

Answer:

I would say the second one

Explanation:

it makes sense cause if you're able to fix the problem that's how. if not then the last one

4 0
3 years ago
Susie works for an architectural firm and the partners have always drawn the plans for projects by hand. Though Susie learned ho
Nookie1986 [14]

Answer:

A. CAD

Explanation:

Computer Aided Design, CAD, is basically for design. It involves the use of a computer to assist in the process of designing a part, circuit, building, etc.

It is also for drafting, here it makes use of a computer to assist in the process of communicating a technical drawing.

CAD has a couple of models in which its drawings and designs are represented. namey;

Solid Modeling: This is a type of 3D CAD process in which volumes of an object are represented not just its lines and surfaces.

Wireframe Modeling: This is a 3D CAD process that represents the lines and surfaces of a design.

Additive Modeling: This is a 3D modelling method in which each component is created individually and subsequent components are created as needed. This method is represented by construction processes such as welding, gluing, mechanical fastening, joinery.

Subtractive Modeling: This is a 3D modelling method in which a design is created by removing different geometric shapes from a solid block larger than the final design. The method is can best be represented by milling, drilling, turning, grinding, and other manufacturing processes.

Susie can make use of CAD and pitch its importance to his clients.

8 0
3 years ago
Which kind of image is indispensable and needs added text to go with it?
STatiana [176]

Answer:

A chart and a graph

Explanation:

8 0
3 years ago
In number theory, a perfect number is a positive integer that is equal to the sum of its proper positive divisors, that is, the
rusak2 [61]

Answer:

Explanation:

def the_perfect(n):

  try: #exception handling if n is a negative number

       n > 0

   except: #return -1 if the error is reached

       return -1

  else:

        total = 0

        for i in range(1, n): #for loop from 1 to the target number

           if n % i == 0:

               total += i

   return total == n  #should return true if number is perfect number

print(perfect_number(8))

8 0
3 years ago
Other questions:
  • The ____ problem-solving cycle involves inputting code to an assembler, translating it to machine language, loading it into a Vo
    10·1 answer
  • Explain the nature of documents that can be suitable for mergin
    12·1 answer
  • Which remote assistance option requires peer name resolution protocol (pnr) and ipv6?
    5·1 answer
  • Which of the following components helps to limit the front-to-back movement of the crankshaft? 
    9·2 answers
  • Regarding computer protection, quarantining is defined as ________.
    9·1 answer
  • Which administrative tool can you use to check your computer's health or troubleshoot problems with the operating system or soft
    11·2 answers
  • What is one advantage of using object-oriented programming?
    14·2 answers
  • Which statement describes the Direction option for animations and transitions?
    5·2 answers
  • PLEASE HELP ILL GIVE BRAINIEST
    6·2 answers
  • ____________ is a process of reverse calculation to achieved a desired result. a. Data Consolidation
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!