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

A cashier distributes change using the maximum number of five-dollar bills, followed by one-dollar bills. Write a single stateme

nt that assigns num_ones with the number of distributed one-dollar bills given amount_to_change. Hint: Use %. Sample output with input: 19
Computers and Technology
1 answer:
Gennadij [26K]3 years ago
6 0

Answer:

amount_to_change = int(input("Enter amount to change: "))

num_fives = amount_to_change // 5

num_ones = amount_to_change % 5

print("There are " + str(num_fives) + " five dollars and " + str(num_ones) + " one dollars in the change")

Explanation:

Ask the user to enter the amount_to_change

Calculate the number of five dollars, use floor division

Calculate the number of one dollars, use modulo operator

Print the number of five dollars and number of one dollars

You might be interested in
After hacking into atm systems remotely using a laptop, What attacker worked with the atm manufacturers to resolve the identifie
Aneli [31]

grey hat hackers are those after hacking into ATM systems remotely using a laptop, works with the ATM manufacturers to resolve the identified security vulnerabilities

  • A grey hat hacker is simply known as an hacker that falls between the range of black and white hacker. They are known to illegally break into systems so as to show off their skills to the administrator of the system they penetrated or to seek to sell their services in repairing security breaches.

  • In the ATM case, they attacked it and then also want the ATM manufacturer to use their service.

Conclusively we can therefore say that the hacker was a gray hat hacker.

Learn more from

brainly.com/question/15899195

3 0
3 years ago
Give an original idea for an app idea to do with sports, please.
BlackZzzverrR [31]
Maden Mobile is an app for sports :)
5 0
4 years ago
Define a JavaScript function named showGrades which does not have any parameters. Your function should create and return an arra
grandymaker [24]

Answer:

see explaination

Explanation:

//selective dev elements by id name

var gradeA = document.querySelector("#GradeA");

var passing = document.querySelector("#Passing");

var learning = document.querySelector("#Learning");

//function showGrades

function showGrades() {

var arr = [];

//converting string to int and inserting into array

arr[0] = parseInt(gradeA.textContent);

arr[1] = parseInt(passing.textContent);

arr[2] = parseInt(learning.textContent);

//creating json blob

var blob = new Blob(new Array(arr), {type:"text/json"});

return blob;

}

8 0
4 years ago
Write a method called compress that takes a string as input, compresses it using rle, and returns the compressed string. case ma
MaRussiya [10]
<span>public static String compress (String original) { StringBuilder compressed = new StringBuilder(); char letter = 0; int count = 1; for (int i = 0; i < original.length(); i++) { if (letter == original.charAt(i)) { count = count + 1; } else { compressed = count !=1 ? compressed.append(count) : compressed; compressed.append(letter); letter = original.charAt(i); count = 1; } } compressed = count !=1 ? compressed.append(count) : compressed; compressed.append(letter); return compressed.toString(); }</span>
5 0
4 years ago
You open a folder by double-clicking on it with your mouse. True False
allsm [11]
Depends if it's not working the first time then u click it twice but normally you click it once
5 0
3 years ago
Read 2 more answers
Other questions:
  • Computer Architecture
    7·1 answer
  • The email program shipped with Microsoft office
    15·1 answer
  • Explain the four basic operation performed by every computer​
    11·2 answers
  • Which of the following tasks would you most likely use a spreadsheet to complete
    15·1 answer
  • Mrs. Jackson wrote a newsletter to the customers of her housecleaning business that included some organizational tips they could
    8·2 answers
  • You are the owner of a computer component manufacturing company. Your manufacturing plant has 10 different machines that can be
    6·1 answer
  • What does the term measure refer to in typography
    7·2 answers
  • B. What is a window?​
    8·2 answers
  • The growing network of physical objects that will have sensors connected to the Internet is referred to as the ________.
    13·1 answer
  • In your opinion, why did Proponents<br>of IPs used IPV6 instead of IPv5​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!