Write a program that prompts the user to input an integer that represents the money in cents. The program will the calculate the smallest combination of coins that the user has. For example, 42 cents is 1 quarter, 1 dime, 1 nickel, and 2 pennies. Similarly, 49 cents is 1 quarter, 2 dimes, and 4 pennies

Answers

Answer 1

Answer:

The program in Python is as follows:

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

quarter = int(cents/25)

if quarter > 1:

     print(str(quarter)+" quarters")

elif quarter == 1:

     print(str(quarter)+" quarter")

cents = cents - quarter * 25

dime = int(cents/10)

if dime>1:

     print(str(dime)+" dimes")

elif dime == 1:

     print(str(dime)+" dime")

cents = cents - dime * 10

nickel = int(cents/5)

if nickel > 1:

     print(str(nickel)+" nickels")

elif nickel == 1:

     print(str(nickel)+" nickel")

penny = cents - nickel * 5

if penny > 1:

     print(str(penny)+" pennies")

elif penny == 1:

     print(str(penny)+" penny")

Explanation:

This line prompts user for input in cents

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

This line calculates the number of quarters in the input amount

quarter = int(cents/25)

This following if statement prints the calculated quarters

if quarter > 1:

     print(str(quarter)+" quarters")

elif quarter == 1:

     print(str(quarter)+" quarter")

cents = cents - quarter * 25

This line calculates the number of dime in the input amount

dime = int(cents/10)

This following if statement prints the calculated dime

if dime>1:

     print(str(dime)+" dimes")

elif dime == 1:

     print(str(dime)+" dime")

cents = cents - dime * 10

This line calculates the number of nickels in the input amount

nickel = int(cents/5)

This following if statement prints the calculated nickels

if nickel > 1:

     print(str(nickel)+" nickels")

elif nickel == 1:

     print(str(nickel)+" nickel")

This line calculates the number of pennies in the input amount

penny = cents - nickel * 5

This following if statement prints the calculated pennies

if penny > 1:

     print(str(penny)+" pennies")

elif penny == 1:

     print(str(penny)+" penny")


Related Questions

what is the color of red?

Answers

Answer:

red

Explanation:

orange and red

Answer: Red

Explanation: The reason why it's red is because of how we see colors through our eyes.

the time a computer takes to start has increased dramatically, one possible explanation for this is that the computer is running out of memory. this explanation is a scientific....
a. hypothesis
b. experiment
c. observation
d. conclusion

Answers

Answer:

A

Explanation:

The appropriate answer will be Option c (observation).

Being able to comprehend or recognize something or be able to notice it his ability to observe in great depth is evident in every explanation or statement, which would be determined as an Observation.The result of observing or noting something, and then forming or expressing a judgment or a king of opinion.

The other given choices,

Experiment or hypothesis - Tests are used to examine a hypothesis or maybe even a concept through the utilization of such an experiment.

Conclusion - The final component of anything or a conclusion made following considerable deliberation.

Are not related to the given scenario. Thus the above option is the right one.

Learn more about observational learning here:

https://brainly.com/question/21861086

Which of the following best defines Monte Carlo simulation?a. It is a tool for building statistical models that characterize relationships among a dependent variable and one or more independent variables.b. It is a collection of techniques that seek to group or segment a collection of objects into subsets.c. It is the process of selecting values of decision variables that minimize or maximize some quantity of interest.d. It is the process of generating random values for uncertain inputs in a model and computing the output variables of interest.

Answers

Answer:

d. It is the process of generating random values for uncertain inputs in a model and computing the output variables of interest.

Explanation:

Monte Carlo simulation is the process of generating random values for uncertain inputs in a model and computing the output variables of interest. It is a type of computational algorithm which is used to predict the probability of various outcomes based on repeated random samples or variables. It is used for better decisions making by providing information about the impact of a risk and for forecasting models.

Which symbol is at the beginning and end of a multiline comment block?

Answers

The beginning of a block comment or a multi-line comment is marked by the symbol /* and the symbol */ marks its end.

A furniture rentingstore rents severaltypes of furnituretocustomers.It charges a minimum fee for the first month. The store charges an additional fee every monthin excess of the first month. There is amaximum charge forany givenyear. Write a program that calculates and prints the chargefor a furniturerental.

Answers

Incomplete question. Attached is an image of the full question.

Explanation:

The best program to use is MS Excel. By using the Summation formula MS excel we can derive the difference in sales for the two years.

why is makyra a loser??​

Answers

Because she doesn’t have any friends :-(

Answer:

She dumbbbbbbbbbbbbbbbbbbbbbb

Explanation: Her mom watched too much spongebob while pregnant

Read the following code:

x = currentAge
print(x + 20)

What value will this code calculate?

Select one:
a. Age in 20 years
b. Age 20 years ago
c. Age at 20 years old
d. Age in the year 2020

Answers

Answer:

The answer is "A) Age in 20 years"

Explanation:

Assuming currentAge is declared and is an integer, you are adding 20 to your current age which means it will print your age in 20 years.

Its Option A - Age in 20 Years.
Thank You!

_________ attacks are becoming less common in modern operating systems.
a. Denial of service
b. SYN flood
c. Buffer overflow
d. None of the above

Answers

Answer:

c. Buffer overflow

Explanation:

In Computer programming, buffer can be defined as an area of memory set aside specially and specifically for holding data or informations.

A type of exploit that relies on overwriting contents of memory to cause unpredictable results in an application is known as buffer overflow. This ultimately implies that, buffer overflow is the process of exceeding the storage capacity of a memory buffer with data, beyond the amount it is designed to hold and therefore overwrites any adjacent memory locations.

Buffer overflow attacks are becoming less common in modern operating systems because the modern operating system usually leaves a space between buffers and randomize the layout of memory through call mapping, as well as through the use of runtime protection.

What is considered to be the core of the Unix operating system ?

Answers

Answer:

My lips

Explanation:

Just kidding what is that?

Assignment 1 silly sentences

Answers

Answer:

Sally sells sea shells by the sea shore

Explanation:

Which of the following is NOT a popular computer programming
language?
C++
Xero
C#
Java

Answers

Answer is Xero. All the other Languages are Popular and Widely Used.
Thank You!

The computer programming  language i.e. not popular is Xero.

The following are the popular computer programming  language:

C++C#Java

The computer programming  language is the language that is applying for writing the programs.

Therefore we can conclude that the computer programming  language i.e. not popular is Xero.

Learn more about the computer here: brainly.com/question/24504878

Write a program to compute answers to some basic geometry formulas. The program prompts the user to input a length (in centimeters) specified as a floating point value. The program then echoes the input and computes areas of squares and circles and the volume of a cube. For the squares, you will assume that the input length value is the length of a side. For the circles, this same value becomes the diameter. Use the meter value input to calculate the results in square (or cubic) meters and then print the answers in square (or cubic) meters.

Answers

Answer:

import math

l = float(input("Enter length in cm: "))

l = l / 100;

print("Entered length is " + str(l) + " meters")

area_square = l * l

print("Area of square is " + str(area_square))

area_circle =  math.pi * l/2 * l/2

print("Area of circle is " + str(area_circle))

volume_cube =  l * l * l

print("Volume of cube is " + str(volume_cube))

Explanation:

*The code is in Python

Ask the user to enter the length in cm

Convert the length to meters and print it

Calculate the area of the square and print it (Since length is equal to a side, the area is length * length)

Calculate the area of the circle and print it (Since length is equal to the diameter, you need to divide it by two to get the radius. The area is pi * length/2 * length/2)

Calculate the volume of the cube and print it (Since length is equal to a side, the volume is length * length * length)

The primary reason for networking standards is to: Group of answer choices simplify cost accounting for networks ensure that hardware and software produced by different vendors can work together make it more difficult to develop hardware and software that link different networks ensure that all network components of a particular network can be provided by only one vendor lock customers into buying network components from one vendor

Answers

Answer:

ensure that hardware and software produced by different vendors can work together.

Explanation:

Networking standards can be defined as a set of rules and requirements for data communication which are necessary for the inter-operation of network devices (hardware) and software application processes.

Hence, the primary reason for networking standards is to ensure that hardware and software produced by different vendors can work together. This ultimately implies that, networking standards makes it possible for various vendors and manufacturers to develop or produce networks that avail users the ability and opportunity to share informations and communicate with one another easily.

Some examples of organizations responsible for creating networking standards are;

1. International Telecommunications Union— Telecommunications (ITU-T).

2. International Organization for Standardization (ISO).

3. American National Standards Institute (ANSI).

Additionally, the generally accepted standards for networking are; HTML, HTTP, IMAP, POP, SNMP, SMTP, TCP etc.

ASP PLZ Study the diagram of the geologic time scale.
Which method is most likely used to identify what happened before the start of the Paleozoic era?

1) Scientists study fossils from the Jurassic period.
2) Scientists observe index fossil records of the Mesozoic era.
3) Scientists examine fossil evidence during the Precambrian time.
4) Scientists explore the emergence of mammals and humans in the Cenozoic era.

Answers

The answer is definitely number 2

Answer:

C. Scientists examine fossil evidence during the Precambrian time.

Explanation:

How is a Creative Commons license different from a regular copyright? As a reminder, in the warm-up we saw the this scenario: ----------------------------------------------------------------------------------------------------------------------- Imagine you were using some of our pixelation tools to create an image and you posted it online for your friends to see - but, a week later you find out someone took that image and put it on a T-shirt that they’re selling for $10 each. -------------------------------------------------------------------------------------------------------------------- Now that we understand Copyright, what would need to change in order for the scenario from the warm-up to be okay?

Answers

Explanation:

You need to change the whole thing and do it differently.. And register it.

The thing that'll need to be changed in order for the scenario from the warm-up to be okay is to create a creative common license which will  give room for people to be able to use my work and sell items that have my work on them.

In this case, the creative commons license enables one to share copyrighted work easily. It should be noted that intense protections are put on a work when the work is copyrighted.

With the creative common, a person can allow others use their work as long as the person abide to rules.

In conclusion, creative common allows one have control of one's work.

Read related link on:

https://brainly.com/question/

How do you begin typing in a table cell?

A. Click within a cell and begin typing.

B. Highlight the table and begin typing.

C. Click on the Convert to Text button in the Layout ribbon.

D. Right-click and select Text Direction.

Answers

Its Option A - Click Within a Cell and begin typing.
Thank you!

To begin typing in a table cell, click within a cell and begin typing. The correct option is A.

What is a table cell?

A table cell is a subset of a chart table that is used to store information or data. Cells are organized both horizontally and vertically.

Each cell contains information about the combination of row and column headings with which it is collinear.

Text, numbers, and a variety of other elements can be included in table cells. Tables were originally used only to display numbers, but they are now useful for a wide variety of tasks.

To begin typing text into a cell, simply select a cell and start typing. To select text that is already inside a cell, place the insertion point within the cell.

In either mode, you can use the arrow keys to navigate around the table, making it simple to enter text into any cell.

Thus, the correct option is A.

For more details regarding a table cell, visit:

https://brainly.com/question/8059827

#SPJ5

Name 3 examples of operating system software that are not Windows based.

Answers

Ubuntu, Linux, and Mint

what is ovoviviparous? ​

Answers

Answer:

o·vo·vi·vip·a·rous

Explanation:

(of an animal) producing young by means of eggs which are hatched within the body of the parent, as in some snakes.

What benefits does the Domain Name System (DNS) provide? Check all that apply.
Network Address Translation (NAT)
Ease of address memorization
Assigning Internet Protocol (IP) addresses
Easy mapping to a new Internet Protocol (IP) address

Answers

Answer:

Option C (Assigning Internet Protocol (IP) addresses) is the correct choice.

Explanation:

DNS is a centralized process for resolving as well as continuing to give IP addresses for something like a specified domain name, a method that allows you to search a site via your web browsers whenever you tab or switch on any web server (Internet Explorer, chrome, respectively.).This helps everyone to still have throughput mostly on the network although one of the databases becomes offline for maintenance.

All other options are not relevant to the situation in question. It is the right answer to all of the above.

Answer:the TCP

Explanation:

C# The video game machine at your local arcade output coupons according to how well you play the game. You can redeem 10 coupons for a candy bar or 3 coupons for a gumball. You prefer candy bars to gumballs. Write a program that defines a variable initially assigned to the number of coupons you win. Next, the program should output how many candy bars and gumballs you can get if you spend all of your coupons on candy bars first, and any remaining coupons on gumballs.

Answers

Answer:

#include<iostream>

using namespace std;

/* main is a function without a parameters which returns an int value*/

int main( )

{

/* declare int data type for numeric values initialize candyBar and gumBall */

int coupons, cabdyBr=10,gumall=3;

int candyBarAmount,gumBallAmount,remainder;

/* cout is used to show the message to user cin to read user input from keyboard and sets the value to coupon */

cout<<"Enter the number of coupons"\t";

cin>>coupons;

/* First check coupons with cabdyBar */

if (coupons >= candyBar)

{

candyBarAmount=coupons/candyBar;

remainder=coupons-(candyBarAmount*10);

}

else

{

candyBarAmount=0;

}

/* check remaining value with gumBall */

if (remainder<<candyBar && remainder>=gumBall)

{

gumBallAmount=remainder/gumball;

}

else

{

gumBallAmount=0;

}

/* show thw required output to the user */

cout<<"The number of Candy bars is "<< candyBarAmount <<endl;

cout<<"The number of gumballs is "<<gumballAmount <<endl;

/* The program ends and return 0 as the functions value */

return 0;

}

OUTPUT

Enter the number of coupons: 23

The number of candy bars = 2

The number of gumballs = 1

Match each task with the features necessary to complete the task

Answers

Is there supposed to be an image?

>>> from hog import *
>>> test_dice = make_test_dice(4, 6, 1)
>>> test_dice()______
>>> test_dice() # Second call
______
>>> test_dice() # Third call______
>>> test_dice() # Fourth call

Answers

Answer:

This Python code is an implementation of an anonymous function like a lambda function in other function.

Explanation:

The function 'make_test_dice' with the arguments 4, 6 and 1, returns a lambda function to the test_dice variable.

The test_dice is called with parenthesis to run the lambda function. This implementation is used to hide a parameter in a calculation or process.

Tomi is testing all of the links on her web page by clicking on each one in a browser. What type of testing is this considered?
Accessibility testing
Broken link testing
Mobile testing
Readability testing

Answers

Answer:

Broken Link testing.

Explanation:

Took the test and did research.

Answer:

Broken link testing

Explanation:

Broken link testing is when you test all of your hyperlinks in a browser window. You can do this by clicking each hyperlink to see if it works. This will ensure the best possible user experience.

For what purpose are high-level programming languages used for

1. Give control over the hardware to execute tasks quickly

2. Provide code that controls the computers hardware

3. Translate low-level programming languages into machine code

4. Write programs for general applications

Answers

Answer:

To speed up the compiler during run time

Explanation:

What does the security element of non-repudiation mean in e-commerce cybersecurity? A. Data needs to be available at all times. B. Only authorized personnel can access data. C. Each website should have privacy control settings. D. Clients cannot refuse to make payments once they place an order.

Answers

Answer:

Non-repudiation is the assurance that someone cannot deny the validity of something. Non-repudiation is a legal concept that is widely used in information security and refers to a service, which provides proof of the origin of data and the integrity of the data

Explanation:

Answer:

Clients cannot refuse to make payments once they place an order.

Explanation:

PLATO Cyber-security

I got 5/5 on the quiz.

Complete the statement below with the correct term.

A single-mode
uses a single ray of light, called a mode, to transmit data.

Answers

Answer:

Its Fiber

Explanation:

Trust me

Answer:

Data transfer through the core using a single light ray (the ray is also called a mode).

The core diameter is around 10 microns.

At distances up to 3 km, single mode delivers data rates up to 10 Gbps.

Cable lengths can extend a great distance. Or FIBER

Explanation:

hope this helps

which of the following terms best describes the product development process?

Answers

Answer:

D - Scientific investigation aims to design and implement an experiment to learn new information, whereas technological development aims to design a product to solve a problem.

Choose the reasons why Windows Server operating systems are a popular choice for a network because they _____. Select all that are applicable.

require the network administrator or computer support technician to manage the system from a client workstation that has the right tools installed on it
work on networks that include using Windows operating systems as well as Mac OS, NetWare, or UNIX
are designed for very large networks and have strong multitasking capabilities
provide a graphical user interface that makes it easier for network administrators to learn the system
use wizards and setup devices as the user operating system, making it easier to set up network features

Answers

Answer:

The answers are -

work on networks that include using Windows operating systems as well as Mac OS, NetWare, or UNIX

provide a graphical user interface that makes it easier for network administrators to learn the system

use wizards and setup devices as the user operating system, making it easier to set up network features

Explanation:

Windows Server operating systems are a popular choice for a network because they work on networks that include using Windows operating systems as well as Mac OS, NetWare, or UNIX, provide a graphical user interface that makes it easier for network administrators to learn the system. The correct options are B and D.

What is operating system?

An operating system (OS) is the program that controls all other application programs in a computer after being installed into the system first by a boot program.

Through a specified application program interface, the application programs seek services from the operating system (API).

The main job of an operating system (OS) is to control files and directories.

The management of files on a computer is the responsibility of the operating system. File creation, opening, shutting, and deletion all fall under this category.

Because they run on networks that use Windows operating systems as well as Mac OS, NetWare, or UNIX, Windows Server operating systems are a common choice for a network.

They also offer a graphical user interface that makes it easier for users to navigate

Thus, the correct options are B and D.

For more details regarding operating system, visit:

https://brainly.com/question/6689423

#SPJ2

Help meeeee - Improved Pet App


Try out the improved version of the pet app that gives the user information about pet stores close by, which uses new sources of input. Determine the information that the app gets from each source of input.


User


Phone Sensors


Internet








Answers

Answer:

Did you do it? Can you give me the answers please‍♀️

Explanation:

Pleaseeeeeeeeeeeeeeeeeeeeeeeeeeeee

Discuss the different types of user-friendly interfaces and the types of users who typically use each.

Answers

Answer:

1. Natural Language Interface- Telephone users

2. Menu Driven Interface- Automated Teller machine users.

3. Graphic User Interface- Computer users

4. Form-based interface- Website visitors

5. Command-line interface- Advanced users of computers

Explanation:

User interface refers to the hardware and software features in a computer system which makes it easier for the operators to relate with the system. Some of them include;

1. Natural Language Interface- This software feature allows the user to send oral instructions to the computer system.  Telephone users experience this when they give oral commands to their phones.

2. Menu Driven Interface- Contains buttons and a touch screen feature that allows users to enter commands in a menu. Automated teller machines used by bank customers are menu-driven interfaces.

3. Graphic User Interphase- Involves the use of the cursor to draw images using graphic icons. Graphic designers can use this to create images.

4. Form-based Interface- Basically contains fields with boxes and menus that would need to be completed. For example, job seekers have to complete fields and boxes before they submit a job application form online.

5. Command-line interface- Is characterized by basic commands which are to be entered by the user to the computer. Advanced users of computes use this feature.

Other Questions
Mrs. Start's class paid $5.60 for 45 yd of lace for an art project. Later, the class decided to buy another 7 34 yd of the same lace to make costumes for the school musical. How much money do they need for this second purchase? Solve for x (see image) pls help!! What volume is represented by each small tick mark? (look at attachment) cmo ests aplicaciones de la biotecnologa ayudan o afectan el bienestar de las personas For something to be considered living, it must be composed of at least one what? 3|3t+1|=2|6t+3| Need hep Explain why the colonists formed a representative government. Simplify 4n5 + 3.5n5 + (-2.1n5). 20 n55.4 n56.4 n54.4 n5(the fives after the n are powers in the answers as well) Find the slope of the line perpendicular to the given line.y=-3/5x+1 Question 6 Multiple Choice Worth 1 points)(01.06 MC)Read and choose the option that best answers the questionTodos los aos, en el mes de mayo, nosotros nos preparamos para el festival de las flores de Panchimalco. El evento comienza a las cuatro de la maana. Esbastante temprano! Arreglarse para un evento tan especial como i festival de las flores de Panchimalco fcilmente puede tomar una o dos horas. Para el evento,los nios, nias y mujeres del pueblo se despiertan antes de las cuatro de la maana para prepararse.Based on the text, what do most people do to prepare for the Panchimalco Flower Festival?Admire the plantsPlant the end of JuneStart early in the dayTrust the youngestPrevious QuestionQuestion 1 (Answered)ONext QuestionO What does health insurance cover? If you pass will they help with funeral cost? The British government rejected the Albany Plan of Union because it believed thatA)the plan might hurt the economies of the colonies.B)the central government should be located somewhere besides Albany.C)the colonies were capable of protecting themselves.D)the plan was unnecessary and might lead to colonial independence. HLEP MEE!!!!Solve for Y! 2(x+3)=x-4 what is x? 5. If the lever arm is longer than the load arm, this lever system would bea class three lever systemb. a high speed systemc. a power systemd. disfunctional and is never seen in biological systems. describe the trend in viscosity of hydrocarbon fuels Love, which can't be observed or measured directly, is an example of a psychological construct.Please select the best answer from the choices provided rueO False jesse got the forecast for new orleans louisiana december 7 2018 Paige's backyard is rectangular. It has alength of 50 yards and a width of 80 feet.Find the perimeter of Paige's backyardusing the correct number of significantdigits. Write this ratio as a fraction in lowest terms 60 minutes to 70 minutes