Write a program that produces a list of nz notes and coins

Assignment Help Basic Computer Science
Reference no: EM131030918

Money dispenser calculatorWrite a program that produces a list of NZ notes and coins required to give change for a user-entered amount up to $1000. The amounts are for whole dollar amounts (there's no need for 50c, 20c and 10c coins), so the variables used should be integers. For example, if the amount was $47, you could pay for this with 47 $1 notes, but you'd normally use a selection of larger denomination notes. For this question, you are to use the largest possible notes or coins at any given step. For the $47 example, as a $100 note is too big and so is a $50, the next step is to dispense $20 notes, and then $10, $5 and so on. The program prompts the user for the initial amount. This becomes the initial balance and as you dispense notes and coins, this balance decreases. e.g. A basic version might produce Initial amount ($): 348 $100 $100 $100 $20 $20 $5 $2 $1 >>> and a more advanced solution might display something like 3 x $100 2 x $20 1 x $5 and so on, however either version is sufficient for full marks. There is a lot of code that is mostly the same, so using a function is recommended.

HINT: don't forget the modulus % operator. Remember this is an arithmetic operator that yields the remainder: e.g. quotient = 47 //10 remainder = 47 % 10 print("47 divided by 10 is", quotient, "-- this used the // operator (integer division)", ) print("with", remainder, "left over. -- this used the % operator (modulus)") 47 divided by 10 is 4 -- this used the // operator (integer division) with 7 left over. -- this used the % operator (modulus)

Reference no: EM131030918

Questions Cloud

Designing a chlorination system for drinking water : Imagine that you are designing a chlorination system for a drinking water treatment plant. The design flow rate is (1577 m3/hr). You must provide a free chlorine residual of at least 1.0 mg/L chlorine in order to protect against contamination in t..
Solve given logarithmic equations : For all problems, write the problem and then delineate the step-by-step process necessary to solve the problems. Solve each logarithmic equation- ln(3x+1) - ln(5+x) = ln2 and 2ln(x-3) = ln(x+5) + ln4
Summarize each article including details on research cited : Based on the information available in these articles, explain your stance. Should people take a multi? Why or why not? Response should be at least 450 words.
History when making an employment decision : Given the emerging national health care plan, to what degree can employers consider an individual's workers compensation, health, disability, or attendance history when making an employment decision?
Write a program that produces a list of nz notes and coins : Money dispenser calculatorWrite a program that produces a list of NZ notes and coins required to give change for a user-entered amount up to $1000.
Hierarchical arrangement of lines of authority : The typically hierarchical arrangement of lines of authority, communications, rights and duties of an organization. Organizational structure determines how the roles, power and responsibilities are assigned, controlled, and coordinated, and how in..
What are the key sources of financing these organisations : Identify the differences in their reports structure and content - What are the key performance indicators?
Pros and cons of separating and integrating : Discuss pros and cons of "separating" and "integrating" the sourcing and logistics functions. Examine whether this BPM project of Gap led to the right decision to split them.
Define an array of size 1000 : For m (its value comes from the keyboard) processes divide that array to (m-1) segments. All the segments except the last one must be equal (Note that the last segment may get bigger than other segments)

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd