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
For a project called "The Sheep Market", Aaron Koblin collected drawings of sheep from strangers on the Internet. He posted the
Furkat [3]

Answer:

Aaron could expect a diversity in the style of the sheep drawings.

Explanation:

Crowdsourcing is a simply a sourcing model in which an individual or organizations get goods and services, ideas and finances, from a large, relatively open and often rapidly growing group of internet users.

It makes it easier for participants to achieve a cumulative result through working differently on the same project. That is to say, it provides work between participants to achieve a cumulative result.

Its benefits is that, Crowdsourcing allows businesses to perform tasks more quickly than when a single employee is working alone. Again, Breaking up a project into a collection of smaller pieces and providing these pieces to a larger group of workers hastens the completion of projects. Overall, crowdsourcing presents a more efficient way to do work.

From the Question, Aaron was able to get different pictures of sheep in their numbers also because he used crowsourcing on amazon.

He got a variety of pictures and so many in such a short time for his project "The Sheep Market".

6 0
4 years ago
The gene form of a trait is called a(n) ​
Rom4ik [11]

Answer:

alleles

Explanation:

7 0
3 years ago
Of the following choices, what indicates the primary purpose of an intrusion detection system (IDS)?
MrRa [10]
That would be (A) because an IDS stands for Intrusion detection system which means that when there’s malicious activity or policy violations. Any malicious activity or violation is typically reported either to an administrator.
8 0
3 years ago
Ben chang noticed that his store was lagging in sales . He realized that his staff was not experienced enough . As the store man
dem82 [27]
Ben should set up a program to teach his staff about customer service, and communicating with clients. 
4 0
3 years ago
Read 2 more answers
What is web browser <br>​
xeze [42]
An application used to access and view websites
7 0
3 years ago
Read 2 more answers
Other questions:
  • A technology company only hires applicants who are under the age of 30. This company could face possibly _________ consequences
    9·2 answers
  • In an advanced word processing program which type of image or graphic is available in a variety of formats and styles?
    12·2 answers
  • If you implement a Wireless LAN (WLAN) to support connectivity for laptops in the Workstation Domain, which domain does WLAN fal
    5·1 answer
  • What information is displayed in the title bar?
    10·1 answer
  • Kiera is building a new computer and wants to make sure she has an adequate power supply for all the new equipment she is purcha
    15·2 answers
  • Which device makes computers that are connected to separate segments appear and behave as if they're on the same segment? (Pleas
    11·1 answer
  • Several NEC® sections contain the requirement to size conductors and overcurrent devices at 100 percent of the noncontinuous loa
    15·1 answer
  • Plz answer this....quickkkkk​
    7·2 answers
  • AJ created a list, and he needs all of the numbers to be in order. Which Python function will allow him to organize his list num
    5·2 answers
  • Here is something cool
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!