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

  The oracle corporation is an multinational computer

Discuss at lease 500 words. The Oracle Corporation is an multinational computer technology corporation that specializes in developing and marketing hardware systems and enterprise software products.

  Create a gantt chart or project plan

Develop in accordance with the systems development life cycle and Create a Gantt chart or project plan (summary and detailed) template.

  Explain the difference between frequency division multiplex

Explain the difference between frequency division multiplexing

  The government should never use fiscal policy

The government should never use fiscal policy to combat business cycle fluctuations coming from changes in autonomous investment if it also wishes to keep longer term movements in the price level to a minimum. Is this claim true, false or uncertain?

  Determine value of maximum element for mle is maximum

Assume that n = 5 points are drawn from distribution and maximum value of which occurs to be 0.6. Plot likelihood p(D|) in range 0  1. Describe in words why you do not need to know values.

  What is the output of the following loop

What is the output of the following loop

  Why deployment of ipv6 has been slow to date

Discuss some of the problems NATs create for IPsec security. (See [Phifer 2000]). Can we solve these problems by using IPv6? Why deployment of IPv6 has been slow to date. What is needed to accelerate its deployment?

  Call and write methods with parameters and return values

Call and write methods with parameters and return values.

  The basic sociological fact in buddhism

1. The basic sociological fact in Buddhism is _______. a. Karma b. Samgha

  Write paper on impact of technology on global business

Write paper on Impact of technology on global business

  World-sheet reparameterization

Consider the string at r = 0. Which of the combinations in ( 12.151) reparameterizes the a coordinate of the string while keeping r = O? When r = 0 is preserved, the world-sheet reparameterization is actually a string reparameterization. Show that..

  When the jmpc field in the microinstruction is enabled

Assume that when the JMPC field in the microinstruction is enabled (set), MBR is ORed with NEXT_ADDRESS to determine the address of the next microinstruction to be executed

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