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
PLEASE HELP ASAP!!!!111 Read "Teenagers are rewriting the rules of the news" (find it somewhere and answer questions below)
Ilya [14]

Answer:

Sorry, we picked up your question late. There are a lot of questions, and every now and then some misses out. And I am sure you will understand. However, the cool thing is your answers are correct. I read the complete article on young adults or teenagers and found the same. And I am sure you will agree with the facts, and use its best meaning in your own life. I am, however, listing below all the answers for your complete satisfaction. And I congratulate you, you are up with the correct list of answers.

The answer to the First question is:

B. the description of how influencers follow young social media users"

Second question answer is

C. Andrew Yang

And the third question answer is:

C. Teens and young adults consume and spread news information through social media.

And I am sure you must have liked this article. Article reading is a good habit. You should always start a day by reading one article online or in newspaper.

Explanation:

Please check the answer section.+

4 0
3 years ago
A word feature that joins a data source and a main document to create a customized document is: combine documents. data merge. m
I am Lyosha [343]
Perhaps it is mail merge
5 0
4 years ago
A ________ attack uses software to try thousands of common words sequentially in an attempt to gain unauthorized access to a use
Andrej [43]
Malware
Hope this helps
3 0
3 years ago
When working with a spreadsheet, data analysts can use the _____ function to locate specific characters in a string.
jonny [76]

When working with a spreadsheet, data analysts can use the CLEAN function to locate specific characters in a string.

<h3>What is the CLEAN Function? </h3>

The CLEAN Function is known to be a tool that is often categorized in the Excel Text functions.

Note that this function tends to delete or remove any kind of non-printable characters from any specified or given text.

Note that As financial analysts, people tend to often import data from a lot of sources and the CLEAN function can help to delete nonprintable characters.

Hence, When working with a spreadsheet, data analysts can use the CLEAN function to locate specific characters in a string.

Learn more about spreadsheet from

brainly.com/question/4965119

#SPJ1

6 0
2 years ago
You are a network engineer tasked with performing a site survey for a multiple-channel architecture (MCA) system in a three-stor
blagie [28]

Answer:

20/20 vision, and quick internal math if you are talking about human characteristics. If you are talking about the sight survey itself and considering other aspects; You would want to make sure the site has an easily accessible area for the client, doing this by considering the following: easy access, building height (cell phone tower correspondents), multi-channel sight points, and wiring less visible than the access point.

Explanation:

5 0
3 years ago
Other questions:
  • The expectations I would discuss with Erica regarding the usage of the internet
    6·1 answer
  • What could cause a fixed disk error.
    15·1 answer
  • What do you use for soaking hands and holding soapy water​
    7·2 answers
  • What type of filtering software divides email messages that have been received into two piles, spam and non-spam and then analyz
    13·1 answer
  • How should you behave in an online academic environment?
    7·2 answers
  • It is the application of knowledge
    7·1 answer
  • Help ASAP please This is a skills lab simulation for college, it’s on Microsoft word is there a keyboard shortcut or something o
    12·1 answer
  • Click the _______________________________ button in the css designer panel to create a new css files, or define an existing exte
    7·1 answer
  • What type of attack occurs when the threat actor snoops and intercepts the digital data transmitted by the computer and resends
    6·1 answer
  • you are a new lenovo service provider and need to use the recovery utility information on the lenovo support website. this infor
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!