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
Natali5045456 [20]
3 years ago
13

A cashier distributes change using the maximum number of five dollar bills, followed by one dollar bills. For example, 19 yields

3 fives and 4 ones. Write a single statement that assigns the number of one dollar bills to variable numOnes, given
Computers and Technology
1 answer:
Alex Ar [27]3 years ago
4 0

Answer:

Written in Python:

dollars = int(input("Amount: "))

numFive = int(dollars/5)

numOnes = dollars%5

print(str(dollars)+" yields "+str(numFive)+" fives and "+str(numOnes)+" ones.")

Explanation:

This line prompts user for input

dollars = int(input("Amount: "))

This line calculates the number of 5 that can be gotten from the input. This is done using integer division

numFive = int(dollars/5)

This line gets the remaining ones. This is done by using the modulo sign to get the remainder when input is divided by 5

numOnes = dollars%5

This line prints the required output

print(str(dollars)+" yields "+str(numFive)+" fives and "+str(numOnes)+" ones.")

You might be interested in
A ______ is an exact duplication of the hard drive, including data files, system files, and settings, application files, and the
olganol [36]
A full system backup
7 0
3 years ago
Which rock band apologized for automatically adding its new album to every iPhone 6 in 2014
Naya [18.7K]
Hey there!
This was done by the band U2.
It's actually gotten quite annoying, and it's yet to be removed.
Hope this helps!
8 0
3 years ago
Read 2 more answers
The readline method of bufferedreader returns _____ when end of file is reached.
Misha Larkins [42]

Answer:

null

Explanation:

it does not turn to null value. It returns ;

when it reaches the end of the file

6 0
1 year ago
write an algorithm that gets the price for item A plus the quantity purchased. The algorithm prints the total cost, including a
I am Lyosha [343]

Answer:

<u>Algorithm() </u>

1. p = Enter the price of item A.

2. c = Enter the number of A’s purchased.

3. Now the price per item with tax is:

              t= p+(p*6/100)

4. The total cost of c items:  

             ct= t * c.

5. Print ct.

In this algorithm, we are taking the price per item and counting it’s cost including tax. Then we are multiplying the price per item with tax with the number of items we purchase, to find the overall cost with tax.

You may calculate the overall cost without tax as (p*c). Then you can find the overall cost with tax as ((p*c)+(p*c*6/100)), as in both way, we will get the same result.

4 0
3 years ago
What is an individual section machine?
irina1246 [14]
The most widely used forming machine arrangement is the individual section machine (or IS machine). This machine has a bank of 5–20 identical sections, each of which contains one complete set of mechanisms to make containers. ... Sections make either one, two, three or four containers simultaneously.
7 0
3 years ago
Other questions:
  • The calls radioed to patrol officers, or assignments given to police patrol units by 911 dispatchers, reveal the types of proble
    9·1 answer
  • Is there a relationship between cybercrime and traditional crime?
    6·1 answer
  • Assume that a 5 element array of type string named boroughs has been declared and initialized. Write the code necessary to switc
    5·1 answer
  • Given the following statement, what is the value of myExample?
    13·1 answer
  • Look at (c), is it accurate? ​
    9·2 answers
  • Example of language processor software
    8·1 answer
  • Which feature is not in ms PowerPoint​
    12·1 answer
  • PLS ANSWER ASAP!!!! <br><br> In three to five sentences, explain the function of utilities.
    13·1 answer
  • In the context of the data administration component of a database management system (DBMS), the acronym CRUD stands for _____.
    5·1 answer
  • Which of the following protocols is used by an email client to retrieve messages from an email server, giving users the option t
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!