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
Nata [24]
3 years ago
11

4. 15 Exact change (College level not sure why it says middle school)

Computers and Technology
1 answer:
sweet [91]3 years ago
6 0

Answer:

def print_change(total_change):#this is also total cents, because integers don't have decimal points, so I can't use dollars as my unit

dollars = int(total_change / 100)

remaining_change = total_change - dollars * 100

quarters = int(remaining_change / 25)

remaining_change -= quarters * 25

dimes = int(remaining_change / 10)

remaining_change -= dimes * 10

nickels = int(remaining_change / 5)

remaining_change -= nickels * 5

pennies = remaining_change

all = {'dollar': dollars, 'quarter': quarters, 'dime': dimes, 'nickel': nickels, 'penny': pennies}

for num in [0, 1, 2, 3, 4]:

coin_type = list(all.keys())[num]

amount = all[coin_type]

if num < 4 and amount > 1 or amount == 0 and num < 4:

coin_type += 's'

elif num == 4 and amount > 1 or amount == 0 and num == 4:

coin_type = 'pennies'

print('\n', amount, coin_type)

while True:

total_change = int(input()) #in cents

print_change(total_change)

Had fun making this one... hope it helps. :)

You might be interested in
Develop a list of privacy protection features that should be present if a website is serious about protecting privacy. Then, vis
dusya [7]

Answer:

The features that required to protect the privacy should be:

  1. Protection of User name and Password
  2. Protection of Finger print and other bio metric information if collected from user.
  3. Protection of Personnel Information such as contact information, Identity information if collected.
  4. Protection of data shared such as pictures and videos.

Explanation:

Privacy protection is required to different websites that are involved in collection of different information from users such as user name, password, contact information, account information and messengers. These websites could be website of some bank, online mailing platforms, online shopping platform and social media platforms. These all are used to share and gather our personnel information for different purposes. To ensure the protection of user data they signed a document with users at the time of making account.

The above mentioned are the features that should be included in privacy protection of the website. As all mentioned features are personnel for every user and should be protected from hackers.

3 0
3 years ago
. Write programming code in C++ for school-based grading system
AleksAgata [21]

Explanation:

The grade must be calculated based on following pattern:

Average Mark RangeGrade91-100A181-90A271-80B161-70B251-60C141-50C233-40D21-32E10-20E2

Calculate Grade of Student in C++

To calculate grade of a student on the basis of total marks in C++ programming, you have to ask from user to enter marks obtained in 5 subjects. Now add marks of all the 5 subjects and divide it by 5 to get average mark. And based on this average mark, find grade as per the table given above:

// C++ Program to Find Grade of Student // -------codescracker.com------- #include<iostream> using namespace std; int main() { int i; float mark, sum=0, avg; cout<<"Enter Marks obtained in 5 Subjects: "; for(i=0; i<5; i++)

6 0
3 years ago
How can i do a back up on one computer and save it to the hard drive in another computer without it being seen by others on the
Ganezh [65]
Unless you share the backup HD only the local user is going to see it. Given that it's a server, it's not a problem. You can also hide the backup with attributes +h +s and many other ways.
8 0
3 years ago
Quantas calorias os adolescentes devem consumir diariamente?
Tema [17]

Answer: los niños requieren un promedio de 2.800 calorías por día, las niñas requieren un promedio de 2.200 calorías por día.

Explanation:

6 0
3 years ago
Jesse is writing a physics quiz about the motion of a roller coaster cart. He has a clip art illustration of a cart rolling hori
NISA [10]
<span>1.editing the image file in a dedicated photo editing program before inserting it
Hope this reaches you before net neutrality sets in</span>
4 0
3 years ago
Read 2 more answers
Other questions:
  • A(n) _____ can be used to convert digitized documents into ascii (american standard code for information interchange) text that
    6·1 answer
  • why do programs include keyboard shortcuts for certain actions? do you prefer the mouse or the keyboard/ why?
    7·1 answer
  • Which are considered regulatory agencies? Check all that apply. WHO PPO HMO CMS CDC NIOSH
    11·2 answers
  • What mass of nh3 can be made from 35g of n2?
    14·1 answer
  • You have been asked to create a Community leveraging Out-of-the-box login, logout, self-registration, and error pages. Would you
    5·1 answer
  • Path of the signal of television
    6·1 answer
  • Https://www.blooket.com/play?id=300932<br> please
    8·2 answers
  • To move an object to the bottom of the stack, click the Send Backwards arrow and then click Send to Back in the Arrange group on
    7·1 answer
  • 我对汉语的兴趣 làm đoạn văn theo đề trên​
    14·1 answer
  • reagan's firm has not had to make large investments in computer or networking hardware or in personnel to maintain the hardware
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!