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
Describe the steps involved in data mining or data analytics when viewed as a process of knowledge discovery.
Aleksandr [31]

Answer:

1. Data Cleaning

2. Data Integration

3. Data Selection

4. Data transformation

5. Data Mining

6. Pattern Evaluation

7. Knowledge presentation

Explanation:

The steps involved in data mining or data analytics when viewed as a process of knowledge discovery includes the following:

Step 1. Data cleaning: this involves the elimination of inconsistent data.

Step 2. Data integration: this involves the combination of data from multiple sources.

Step 3. Data selection: this is the step where significant data for task examination are gathered from the database.

Step 4. Data transformation: this the step in which the data are modified for mining by conducting the aggregate operation.

Step 5. Data mining: this step involves the extraction of data patterns through specific techniques.

Step 6. Pattern evaluation: this step involves the identification of patterns that depict knowledge based on measures.

Step 7. Knowledge presentation: this is the step in which visualization and knowledge representation methods are utilized to illustrate mined knowledge to users.

6 0
3 years ago
Advantages of python programming language
Sauron [17]

Answer:

Great starter programming language. Overall very powerful but for beginners the more advanced characteristics like GUIs are too complicated. This is coming from personal experience and after first experiencing programming through Python, Javascript is my new favorite.

Explanation:

a great video by code camp titled "Learn Python - Full Course for Beginners [Tutorial]" is a great starting point!

6 0
3 years ago
Can someone help me please
Andreyy89
Your anwser will be the last one
6 0
3 years ago
Read 2 more answers
What is desktop computer? <br> ​
butalik [34]

Answer:

a computer suitable for use at an ordinary desk.

noun: desktop computer

"a new low-end desktop"

Explanation:

please mark me as a brainly

3 0
2 years ago
Read 3 more answers
An application with a 150 GB relational database runs on an EC2 Instance. While the application is used infrequently with small
kupik [55]

Answer:

the bandman is hered that mybaddba

4 0
3 years ago
Other questions:
  • The Beaufort Wind Scale is used to characterize the strength of winds. The scale uses integer values and goes from a force of 0,
    5·1 answer
  • In terms of resource utilization, a /an application may require higher local
    8·1 answer
  • An airline company would like to easily locate lost luggage. What technology would make it easier for them to locate the luggage
    6·2 answers
  • Which of the following is the path to the zoom button? select one:
    5·2 answers
  • A ___________ variable is declared outside all functions.
    15·1 answer
  • A cybersecurity analyst is currently investigating a server outage. The analyst has discovered the following value was entered f
    9·1 answer
  • A solid understanding of __________ is the foundation of verbal communication
    7·1 answer
  • ____________________________ and _________________________ are 2 positive impacts of the internet on businesses.
    14·2 answers
  • At the heart of every computing device is a(n) _______________, which is usually a single, thin wafer of silicon and tiny transi
    12·1 answer
  • How have productivity programs improved the professional lives of people? (check all that apply)
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!