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
max2010maxim [7]
3 years ago
8

Write a program with total change amount as an integer input, and

Engineering
1 answer:
AURORKA [14]3 years ago
8 0

Answer:

amount = int(input())

#Check if input is less than 1

if amount<=0:

    print("No change")

else: #If otherwise

    #Convert amount to various coins

    dollar = int(amount/100) #Convert to dollar

    amount = amount % 100 #Get remainder after conversion

    quarter = int(amount/25) #Convert to quarters

    amount = amount % 25 #Get remainder after conversion

    dime = int(amount/10) #Convert to dimes

    amount = amount % 10 #Get remainder after conversion

    nickel = int(amount/5) #Convert to nickel

    penny = amount % 5 #Get remainder after conversion

    #Print results

    if dollar >= 1:

          if dollar == 1:

                print(str(dollar)+" Dollar")

          else:

                print(str(dollar)+" Dollars")

    if quarter >= 1:

          if quarter == 1:

                print(str(quarter)+" Quarter")

          else:

                print(str(quarter)+" Quarters")

    if dime >= 1:

          if dime == 1:

                print(str(dime)+" Dime")

          else:

                print(str(dime)+" Dimes")

    if nickel >= 1:

          if nickel == 1:

                print(str(nickel)+" Nickel")

          else:

                print(str(nickel)+" Nickels")

    if penny >= 1:

          if penny == 1:

                print(str(penny)+" Penny")

          else:

                print(str(penny)+" Pennies")

Explanation:

You might be interested in
According to OSHA, employers must_____ and _____ hazardous chemicals in the workplace. Which selection completes the sentence to
Aliun [14]
C. Communicate; label
7 0
4 years ago
Three natural materials that were used by early man as roof covering​
olga55 [171]

Explanation:

animal parts, wood, rock, and clay

8 0
3 years ago
Read 2 more answers
Technician A says that tire markings now include load ratings on tires. Technician B says that they are only included on truck t
Ludmilka [50]
Technician A is correct hope this helps
5 0
3 years ago
Which is not a force of flight?<br> A. Lift<br> B. Drag<br> C. Thrust<br> D. Mass
tatyana61 [14]
Thrust I think lol faxgurscg
4 0
3 years ago
Describe the "Bauschinger Effect" on the stress strain behaviour of steel
Rom4ik [11]

Answer:

The Bauschinger effect is the directionally determined change in the elasticity limit of a metal or alloy after primary plastic deformation. If you first deform a metal in one direction so that it is plastically deformed and then deform it in the opposite direction, the elastic limit in the opposite direction is lower.

From the point of view of the dislocation mechanism of plastic deformation, the Bauschinger effect indicates that during repeated deformation, it is easier for dislocations blocked in front of obstacles to move in the direction opposite to their movement during preliminary plastic deformation.

7 0
4 years ago
Other questions:
  • Heather is troubleshooting a computer at her worksite. She has interviewed the computer’s user and is currently trying to reprod
    11·1 answer
  • What is the net force acting on a 15kg sled that acceleration at 5m/s^2?
    11·1 answer
  • An electric field is expressed in rectangular coordinates by E = 6x2ax + 6y ay +4az V/m.Find:a) VMN if point M and N are specifi
    14·1 answer
  • A load P is applied horizontally while the other end is fixed to a structure. A load P is applied horizontally while the other e
    6·1 answer
  • The Machine Shop has received an order to turn three alloy steel cylinders. Starting diameter = 250 mm and length = 625 mm. Feed
    7·1 answer
  • There are three MUXes in the EX stage. Among them, the 2 MUXes located at the top is meant to provide correct ALU source data 1
    13·1 answer
  • Before charging a system that has been opened for service
    11·1 answer
  • Want to cancel my accouny
    9·2 answers
  • 2. The speaker argues that more data allow us to see new things. Think about your favorite hobby—skateboarding, listening to mus
    8·2 answers
  • When servicing piston rods and pins it is important to always
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!