Consider the change-counting program

Assignment Help Basic Statistics
Reference no: EM131043177

Consider the change-counting program of section 1.2.2. It would be nice to be able to easily change the currency used by the program, so that we could compute the number of ways to change a British pound, for example. As the program is written, the knowledge of the currency is distributed partly into the procedure first-denomination and partly into the procedure count-change (which knows that there are five kinds of U.S. coins). It would be nicer to be able to supply a list of coins to be used for making change.

We want to rewrite the procedure cc so that its second argument is a list of the values of the coins to use rather than an integer specifying which coins to use. We could then have lists that defined each kind of currency
(define us-coins (list 50 25 10 5 1)) (define uk-coins (list 100 50 20 10 5 2 1 0.5))

We could then call cc as follows:
(cc 100 us-coins) 292
To do this will require changing the program cc somewhat. It will still have the same form, but it will access its second argument differently, as follows:

1836_kk.jpg

Define the procedures first-denomination, except-first-denomination, and nomore? in terms of primitive operations on list structures. Does the order of the list coin-values affect the answer produced by cc? Why or why not?

 

Reference no: EM131043177

Questions Cloud

Venture capital than in other types of investment : Explain liquidity risk and relate it specifically to venture capital. Do you believe that liquidity risk is more important or crucial in venture capital than in other types of investment? Explain.
Organization strategic and operational concerns : How can risk managers help bridge the gap between an organization's strategic and operational concerns?
Method of performance measurement : ________________________ is a method of performance measurement that uses several statements describing each attribute to produce a final score for that attribute
What is iriss after-tax cash flow this year from investment : Iris pays 15% in dividends and capital gains taxes and 35% in ordinary income taxes. What is Iris's after-tax cash flow this year from this investment?
Consider the change-counting program : Consider the change-counting program of section 1.2.2. It would be nice to be able to easily change the currency used by the program, so that we could compute the number of ways to change a British pound, for example.
Full subsidizing for his examination : Dr. Phil Hayes has gotten an offer of full subsidizing for his examination on another medication fabricated by Eli Mentin. The medication would be a contender for Prozac without the addressed symptoms of conceivable vicious conduct.
What is the effective annual rate and shop report : Ricky Ripov’s Pawn Shop charges an interest rate of 16 percent per month on loans to its customers. Like all lenders, Ricky must report an APR to consumers. Requirement 1: What rate should the shop report? What is the effective annual rate?
Account of the usage of the medicare and medicaid programs : Insight Enterprises, Inc. (IE) is a multinational social insurance venture with 143 healing centers on four mainlands. IE was begun by Richard K. Eamer, an expense lawyer, in the 1960s. Eamer's advancement of IE was conceivable on account of the u..
Make monthly deposits-retirement account : You are to make monthly deposits of $750 into a retirement account that pays 10 percent interest compounded monthly. Required: If your first deposit will be made one month from now, how large will your retirement account be in 34 years?

Reviews

Write a Review

Basic Statistics Questions & Answers

  Level of measurement used in research

In some places in the US, people are aware of the need for more care for older citizens, like Dr. Hope. In the election in one area, they put forward a referendum that would increase the county sales tax by one cent to pay for increased services f..

  Provide graphical depictions of both the weights and

as the quality engineer for a small chain of fast food restaurants called mcdowells theyve got the big mac weve got the

  Construct a dotplot of the resulting sample values

A sample of pages from this book is to be obtained, and the number of words on each selected page will be determined. For the purposes of this exercise, equations are not counted as words and a number is counted as a word only if it is spelled ou..

  In order to determine any difference between the average

in order to determine any difference between the average daily sales of two branches of a department store the data

  Determine two-sided confidence intervals of mean speed

Suppose observations on 50 vehicles yielded a sample mean of 65 mph. Assume that the standard deviation of vehicle speed is known to be 6 mph. Determine the two-sided 99% confidence intervals of the mean speed.

  Determine the upper-tail critical value from f-distribution

A statistics instructor wonders whether there is a significant difference in her student's GPA for each of her three sections. Determine the upper-tail critical value from the F-distribution

  What is the population and the sample to problem

On average, 8% of the subscribers respond to the survey. Of the 8% who respond, an average of 53% say they will renew. What is the Population and the Sample to this problem.

  Find probability that voter will prefer a as a function

what is the probability that he will prefer A, as a function of a and b? 3. Under what conditions on a and b will this probability exceed 0.8?

  That the margin of error in a 95 confidence interval for

we wish to design a study to assess risk factors for stroke and dementia. there are two primary outcome measures. the

  Determine the best course to take next quarter

The owner of the Burger Doodle Restaurant is considering two ways to expand operations: open a drive-up window or serve breakfast

  What effect organizations had on reducing tribal poverty

the National Indian Gaming Association are dedicated to Native American affairs. What effect have these organizations had on reducing tribal poverty encouraging prosperity?

  Determining expected value for probability distribution

The resort's historical climate data suggests that the probability of a good winter with lots of snow during any given year is 40%.

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