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
FrozenT [24]
3 years ago
15

3. Write a program that prompts the user to input an integer that represents cents. The program will then calculate the smallest

combination of coins that the user has. For example, 27 cents is 1 quarter, 0 nickle, and 2 pennies. That is 27=1*25+0*5+2*1.
Computers and Technology
1 answer:
miss Akunina [59]3 years ago
6 0

Answer:

The program in Python is as follows:

cents = int(input("Cents: "))

qtr = int(cents/25)

cents = cents -qtr * 25

nkl = int(cents/5)

pny = cents -nkl * 5

print(qtr,"quarters,",nkl,"nickels,",pny,"pennies")

Explanation:

This gets input for cents

cents = int(input("Cents: "))

This calculates the quarters in cents

qtr = int(cents/25)

This gets the remaining cents

cents = cents -qtr * 25

This calculates the nickel in remaining cents

nkl = int(cents/5)

This calculates the pennies in remaining cents

pny = cents -nkl * 5

This prints the required output

print(qtr,"quarters,",nkl,"nickels,",pny,"pennies")

You might be interested in
Question #2: How would you demonstrate professionalism in a video call with a teacher? Edmentum Digital world Please Help!!
Stella [2.4K]

Answer:

good luck getting an answer then

Explanation:

5 0
3 years ago
How many bytes are in 1 kilobyte of storage
topjm [15]

Answer:

1000

Explanation I SEARCHED IT Up

5 0
4 years ago
Becky is preparing a document for her environmental studies project. She wants to check her document for spelling and grammar er
Sunny_sXe [5.5K]
If it's MS Word (it probably is), then it's Alt + F7
7 0
3 years ago
Read 2 more answers
You can use the___<br> to copy data from Excel to Access.
kap26 [50]

Answer:

You can use the Import spreadsheet wizard program.

Explanation:

On the Office ribbon, select the External Data tab and click Excel. The "Get External Data - Excel Spreadsheet" wizard appears. In the File name field, browse to the Excel file. Select the "Import the source data into a new table in the current database" option and click OK.

8 0
2 years ago
Task 04
aleksley [76]

Answer:

are u sure this is the right question?

Explanation:

7 0
1 year ago
Other questions:
  • What is the difference between a denial-of-service attack and a distributed denial-of-service attacks? which is potentially more
    10·1 answer
  • . A program that can run more than one thread at once is called:
    9·1 answer
  • What is the leading use of computers
    15·2 answers
  • Online Book Merchants offers premium customers 1 free book with every purchase of 5 or more books and offers 2 free books with e
    11·1 answer
  • What is the difference between an internal and an external method call? In what situation would only internal calls be needed?
    11·1 answer
  • High level language - An object oriented programming language​
    5·1 answer
  • How can a user access the Mailbox Cleanup tools?
    11·2 answers
  • Convert the given for loop to while loop and find the output of the program assuming the
    14·1 answer
  • 25 POINTS PLATO
    6·2 answers
  • Web résumés allow you to include extra graphics and images that you would not include in a traditional résumé. Please select the
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!