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
Rainbow [258]
3 years ago
7

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.
Computers and Technology
1 answer:
alexandr1967 [171]3 years ago
7 0

Answer:

a=input("Amount in pennies")

b=int(a)

dollars=0

dimes= 0

quarters=0

nickels=0

pennies = 0

dollars = int(b/100)

b= b- dollars *100

quarters=int(b/25)

b=b-quarters*25

dimes = int(b/10)

b = b -dimes*10

nickels=int(b/5)

b=b - nickels * 5

pennies = b

print(dollars)

print(dimes)

print(nickels)

print(pennies)

Explanation:

The required program is in answer section. Note, the amount is entered in pennies.

You might be interested in
Given an int variable k, an int array incompletes that has been declared and initialized, an int variable studentID that has bee
Feliz [49]

Answer:

check the explanation

Explanation:

Variables when it comes to programming are used to store data to be documented and manipulated in a computer program. They can also be used for labeling stored data with a descriptive name and any other needed details, so that the programs can be comprehended more understandably by the reader and ourselves.

to solve the question, we will write this set of codes;

numberOfIncompletes = 0;

for(k = 0; k < incompletes.length; k++)

{

       if(incompletes[k] == studentID)

           numberOfIncompletes++;

}

7 0
3 years ago
____ are programs that run independently and travel between computers and across networks.
fiasKO [112]
<span>Worms are programs that run independently and travel between computers and across networks.
</span>Those are malicious programs which are exploiting operating system vulnerabilities and by doing so they spread itself. They <span>self-replicate on computers or via computer networks without the user being aware.</span>
3 0
3 years ago
Which command button contains the following sub options as given in the picture?
DiKsa [7]

Answer:

D) Slide options

Explanation:

hope this helps

7 0
3 years ago
Read 2 more answers
1. Railroad tracks present no problems for a motorcyclist.
Yuki888 [10]

Answer: 1 is A

2 is D

Explanation:

3 0
2 years ago
What tabs found in the Windows Task Manager dialog box
fredd [130]
The applications you have open, and some background processes.
7 0
3 years ago
Other questions:
  • What does iSCSI stand for?
    5·2 answers
  • Consider the following classes: public class A { private int myNum; public A(int x) { myNum = x; } public int getNumber() { retu
    11·1 answer
  • In an oligopolistic market, consumer choice is?
    12·2 answers
  • Why it’s important to keep the standard internet protocol TCP/IP?
    11·1 answer
  • The ____ command displays the last 10 lines of a text file.
    5·1 answer
  • Give 2 examples of when spreadsheets are used.
    15·1 answer
  • Why is the cyber community important???
    8·2 answers
  • Write a Temperature class that will hold a temperature in Fahrenheit and provide methodsto get the temperature in Fahrenheit, Ce
    14·1 answer
  • Which examples demonstrate common education and qualifications for Manufacturing Production Process Development careers? Check a
    12·2 answers
  • Assume that x and y are boolean variables and have been properly initialized. !(x || y) || (x || y) The result of evaluating the
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!