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
Which network device sends data to every device that is connected to it?.
rusak2 [61]

Answer:

Router

Explanation:

A router is a more complex device that usually includes the capability of hubs, bridges and switches. A hub broadcasts data to all devices on a network. This can use a lot of bandwidth as it results in unnecessary data being sent - not all computers might need to receive the data.

6 0
2 years ago
1. A cell is identified by its ........
earnstyle [38]
Answers:
1- cell address ( i think)
5 0
3 years ago
Design a program that asks the user to enter a string containing a series of single digit numbers with nothing separating them.
ruslelena [56]

Answer:

  1. def calcSum(d):
  2.    sum = 0
  3.    for x in d:
  4.        sum += int(x)
  5.    return sum
  6. digits = input("Please enter your digits: ")
  7. print(calcSum(digits))

Explanation:

The solution code is written in Python.

Firstly, create a function that take one input digit string (Line 1).

In the function, create a sum variable with initial value 0.

Use a for loop to traverse through each character in the digit string and in the loop use int method to convert each character to integer and add it to sum variable (Line 3-5) and return the sum as output.

Next, use input function to prompt user enter a digit string (Line 7).

Lastly test the function by passing the input digit as argument and print the result (Line 8).

7 0
3 years ago
what will happen to the contents of the destination ell if you copy the contents of the source cell into the destination cell
DochEvi [55]

Answer:

It's content will be replaced with a content from the source cell.

7 0
3 years ago
design a relational database in EER for bike helmets and their reviews. a bike helmet has a name and color attributes. a bike co
Law Incorporation [45]

Answer:something you gotta do on your own

Explanation:

7 0
3 years ago
Other questions:
  • What are 2 ways that technology can negatively impact the environment.
    8·2 answers
  • All ofthe following are correct EXCEPT one option when it comes towriting disappointing news letters. Identify theexception.
    6·1 answer
  • What is the financial aspect for a business as to what database software they will buy?
    6·1 answer
  • “identify the skill in the following scenario” :
    6·2 answers
  • What is the correct html for referring to an external style sheet?
    11·1 answer
  • Kylee needs to ensure that if a particular client sends her an email while she is on vacation, the email is forwarded to a
    5·1 answer
  • Which of the following statements is true of San serif fonts?
    12·2 answers
  • The process of sending a result back to another part of the program is
    14·1 answer
  • How is technology moving the business world forward?
    13·1 answer
  • Does The ps5 digital have a disc drive even Though ps4 games are not compatible
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!