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
kykrilka [37]
3 years ago
12

Write a program to assist a cashier with determining correct change. The program should have one input, the number of cents to r

eturn to the customer. The output should be the appropriate change in quarters, dimes, nickels and cents.
Computers and Technology
1 answer:
SCORPION-xisa [38]3 years ago
5 0
```
#!/usr/local/bin/python3

import sys

coins = { "quarters" : 25, "dimes" : 10, "nickels" : 5, "pennies" : 1 }

def mkChange( balance, coin ):
    qty = balance // coins[ coin ]
    if( qty ):
        print( str( qty ) + ' ' + coin )
    return( balance % coins[ coin ] )

if( __name__ == "__main__" ):
    if( len( sys.argv ) == 2 ):
        balance = int( sys.argv[ 1 ] )
        balance = mkChange( balance, "quarters" )
        balance = mkChange( balance, "dimes" )
        balance = mkChange( balance, "nickels" )
        balance = mkChange( balance, "pennies" )
    else:
        sys.stderr.write( "\nusage: " + sys.argv[ 0 ] + " <change owed>\n" )
```


You might be interested in
What is the relevance of Address Block?​
klemol [59]

Answer: The relevance of Address Block is Yoda.

Explanation: Yoda is the main course for the Address Block.

5 0
3 years ago
A company used computer auditing techniques to compare employees' telephone numbers with vendors' telephone numbers. This is an
ElenaW [278]

Answer:

Building audit programs to proactively look for symptoms and exposures

Explanation:

Proactive fraud auditing is the process by which fraud is proactively mitigated against by employing all encompassing means of detecting fraud in a system.

Step 4 in proactive fraud auditing characterizes searching for symptoms of fraud risks prior to identifying symptoms of fraud risks in step 3 of the process. Other steps in proactive fraud auditing include investigations and detection of the fraud.

3 0
4 years ago
Read 2 more answers
witch option in a presentation program contains the formatting and placeholders for all the items that appear on a slide?
Nikitich [7]

SWITCH BETWEEN OPEN PRESENTATIONS. ..... Presentation software is a program designed for the production and display of .... image file format and version number. 1. .... Option. To Do This. Normal. Contains three panes: the outline pane, the slide pane, and the notes pane. .... appear on every slide in a presentation.

7 0
3 years ago
Read 2 more answers
Olivia started working last year. By April 15th, she will need to prepare and send the Federal government _____.
omeli [17]
Income tax documents
5 0
3 years ago
Read 2 more answers
Match the careers with the education required for each job
Gekata [30.6K]
Statistician for the last one network administaror for the next one then animator then broadcast tech
6 0
3 years ago
Other questions:
  • What is basic function of an operating system?
    10·2 answers
  • Silver, lead, and hydrogen are examples of what type of matter?
    12·1 answer
  • If you touch a downed power line covered or bare, what’s the likely outcome?
    10·2 answers
  • Complete the statement below with the correct term.
    5·1 answer
  • What attack occurs when a domain pointer that links a domain name to a specific web server is changed by a threat actor?
    11·1 answer
  • Feature of electric circuit​
    14·2 answers
  • The fact that the speed of a vehicle is lower than the prescribed limits shall relieve the driver from the duty to decrease spee
    11·2 answers
  • Create one Python module: arithmetic which has two functions: add(x, y) and get_length(x). The description of two functions are
    7·1 answer
  • Create a statement that always returns the names of the three criminals with the highest number of crimes committed.
    15·1 answer
  • What are the four major software packages of microsoft​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!