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
jenyasd209 [6]
3 years ago
13

# change amount as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Do

llars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies
my code produces no output and i cant find why?


coin_change =int(input())

def coin_change(cents):
if cents <= 0:
print( 'Zero cents.')
else:
quarter = cents // 25
dime = (cents % 25) //10
nickle = cents % 25 % 10 // 5
penny = cents % 5



print (coin_change )
# produces no output
Computers and Technology
1 answer:
tiny-mole [99]3 years ago
3 0

Answer:

Explanation:

The Python code provided was not producing any output because you were never printing out the coin variables that you created. The following code adds the needed print statements using the right singular or plural coin name as needed.

cents = int(input())

 

def coin_change(cents):

   if cents <= 0:

       print('Zero cents.')

   else:

       quarter = cents // 25

       dime = (cents % 25) // 10

       nickle = cents % 25 % 10 // 5

       penny = cents % 5

   if quarter == 0 or quarter > 1:

       print(str(quarter) + " quarters")

   else:

       print(str(quarter) + " quarter")

   if dime == 0 or dime > 1:

       print(str(dime) + " dimes")

   else:

       print(str(dime) + " dime")

   if nickle == 0 or nickle > 1:

       print(str(nickle) + " nickels")

   else:

       print(str(nickle) + " nickel")

   if penny == 0 or penny > 1:

       print(str(penny) + " pennies")

   else:

       print(str(penny) + " penny")

coin_change(cents)

You might be interested in
True or false? The following deterministic finite-state automaton recognizes the set of all bit strings such that the first bit
aleksklad [387]

Answer:gjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj

Explanation:

7 0
3 years ago
Most licensing agencies offer an orientation meeting for applicants who want to obtain licensing for a child care facility or a
Eva8 [605]
The correct option is C.
Licensing agencies organised orientation meetings for those newly seeking day care facility license in order to educate  and familiarize them with the requirements that must be met and the laws and regulations that govern operating a day care facility. This orientation meeting usually equipped the participants with the information they need to succeed in the business.<span />
5 0
3 years ago
Read 2 more answers
Which is the best programming practice?
irina [24]

Answer:

Open a file when the program needs to work with it and close the file as soon as you have finished using it.

Explanation:

In programming, we have some files that are stored in memory, or created in some other section of the program to save information.

<u><em>for example</em></u>, we want to save the data of a class or school faculty to create a database. For this purpose I need to create a file.

As the files that we will create may contains data, these files will utilize computer resources such as, memory (RAM, Cache) and other resources. While programming, we need these resources as well.

<em>Therefore, It is necessary to open a file when the program needs to work with it and close the file as soon as we have finished using it. The reason is that, it takes computer resources which are limited.    </em>

4 0
3 years ago
Only the _________ can add users with passwords and limit user access to selected areas.
Iteru [2.4K]

Answer:

The answer to this question is "Quickbooks administrator.

Explanation:

The answer is the Quick books administrator because Quick books is a software that is used for accounting developed. It helps us to keep in mind all the expenses in the business and things like invoicing, reporting.In this software, we can add new users and give them permission. If we want to allow Users to access the software.

In the Quickbooks administrator, we can add the user with limited access also. So the correct answer is Quickbooks administrator.

8 0
3 years ago
In a computer-controlled greenhouse, a temperature sensor and a window motor are connected to the computer.
GrogVix [38]
Hope this helps solve it

8 0
3 years ago
Other questions:
  • Someone help me I don’t know what to do /COMPUTER SCIENCE
    5·1 answer
  • What is a flash player?
    9·2 answers
  • It proceeds the statement causes execution of the current loop iteration to end and commence at the beginning of the next loop.
    10·1 answer
  • Hunter took his sick puppy to Jade to get medication. Jade is
    14·2 answers
  • The merge sort algorithm____________.A. Can be used only on vectors of even length.B. Works by reducing vectors down to the base
    9·1 answer
  • Suppose the message 111010 is to be transmitted (beginning with the leftmost bit) using
    6·1 answer
  • HELP ASAP 10 POINTS COMPUTER SCIENCE
    14·2 answers
  • How did imperialism lead to WWI? A The debate of the morality of imperialism created tensions around Europe b Native people were
    12·1 answer
  • Explain the history of computing device of mechanical era
    7·1 answer
  • Which of the following are drivers of machine learning growth?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!