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
How do professionals address their problems?
8090 [49]

Answer:

b, with grace and maturity

6 0
3 years ago
Read 2 more answers
Survey data are collected by using all of these methods EXCEPT
castortr0y [4]

Answer:

Survey data are collected by using all of these methods except Field Research.

Explanation:

In field research data has been gathered from different experiments, qualitative analysis and observations of any event.

On the other hand, survey data can be collected from Following:

<u>structured interview</u><u>:</u>

where data can be gathered by interviews and analyzed it on quantitative basis.

<u>Face to face questionnaires:</u>

Data has been collected by asking questions directly from users in the form of interview.

<u>self-administered questionnaires</u>

In this research, questionnaire has been designed to asked question related to some topic without conducting interview.

8 0
4 years ago
Ms. Osteen gives her class an assignment to insert background color that gradually changes from blue to green. To accomplish thi
irina1246 [14]

Answer:

C

Explanation:

7 0
3 years ago
Which of the following applies to a DNS caching server? (Choose all that apply.)
Alborosie

Answer:

The answers are:  it is used to enable fast DNS queries and  It can help reduce the amount of network traffic generated by DNS servers.

Explanation:

Because a DNS server can resolve a query from tis local data sends a recursive qyery to a root server.

3 0
4 years ago
Why are charts and graphs included in documents rather than just raw data?
trapecia [35]

Answer:

It's more organized and easier to look at

Explanation:

If it was just the raw data, it would take more time to analize, rather than it already being in a chart or graph

4 0
3 years ago
Other questions:
  • Write a Scheme function called "sum" which takes an input function func and a nonnegative number n and outputs the value
    10·1 answer
  • "The network layer is responsible for transferring packets of data from the A.Source computer to the destination computer on adj
    11·1 answer
  • Be my friend plzzzzzzz
    7·2 answers
  • In c#, how are parameters passed on?
    15·2 answers
  • You can minimize the Ribbon with a command contained on the _____.
    7·1 answer
  • What is the meaning of antimonographycationalis​
    9·2 answers
  • Witch icon allows you to see paragraph formatting feature
    6·1 answer
  • Help a brotha out..................
    10·1 answer
  • Testing a website includes visiting every web page on the site and selecting every link, tab, and button available.
    11·1 answer
  • What is a cyber crime?<br><br>help
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!