One user-defined function

Assignment Help Business Economics
Reference no: EM131258847

The nth Fibonacci number Fn is defined as follows:F0 = 1, F1 = 1,andFn = Fn-1 + Fn-2 for n > 1In other words, each number is the sum of the two previous numbers in the sequence. Thus, thefirst several Fibonacci numbers are 1, 1, 2, 3, 5, and 8. Interestingly, certain population growthrates are characterized by the Fibonacci numbers. If a population has no deaths, then the seriesgives the size of the population after each time period.Assume that a population of green crud grows at a rate described by the Fibonacci numbers andhas a time period of 5 days. Hence, if a green crud population starts out as 10 pounds of crud,then after 5 days, there is still 10 pounds of crud; in 10 days, there is 20 pounds of crud; in 15days, 30 pounds of crud; in 20 days, 50 pounds of crud, and so on, i.e.,Write a program that takes both the initial size of a green crud population (in pounds) and somenumber of days as input from the keyboard, and computes from that information the size of thepopulation (in pounds) after the specified number of days. Assume that the population size is thesame for four days and then increases every fifth day. The program must allow the user to repeatthis calculation as long as desired. Please note that zero is a valid number of days for the crud togrow in which case it would remain at its initial value.You should make good use of functions to make your code easy to read. Please use at least one user-defined function (except of the clear_keyboard_buffer function) to write your program.

Reference no: EM131258847

Questions Cloud

Prepared an end-of-period spreadsheet : Foxy Investigative Services is an investigative services firm that is owned and operated by Shirley Vickers. On November 30, 2018, the end of the fiscal year, the accountant for Foxy Investigative Services prepared an end-of-period spreadsheet, a par..
Maintaining executive support for programs : Acquisition strategy statements are important documents for gaining and maintaining executive support for programs and projects. What in your view are the one or two biggest challenges in developing an acquisition strategy?
Provide background information about the agency and goals : Provide background information about the agency, mission, goals, objectives, departments, and strategic plan. (Title this section Introduction.)
One user-defined function : Please note that zero is a valid number of days for the crud togrow in which case it would remain at its initial value.You should make good use of functions to make your code easy to read. Please use at least one user-defined function (except of t..
What is an associative entity : 1. What is an associative entity? When must a many-to-many relationship be modelled as an associative entity? Provide some examples demonstrate this issue.
Matching in between inputs and outputs : A switch is a circuit that connects n inputs to n outputs by a one-to-one matching in between inputs and outputs.
Write a program that prompts for a date : Write a program that prompts for a date (month, day, year) and reports the day of the week for that date. It might be helpful to know that January 1, 1601 was a Monday.
How to account for dissolution or liquidation of partnership : Research examples of different methods that partnerships can use to allocate net income to the partners, and research the topics of partnership dissolution or partnership liquidation When you've completed your research, provide at least one example o..

Reviews

Write a Review

Business Economics Questions & Answers

  When final sales are larger than gdp

The total value added in the production of a final good a. exceeds the price of the final good b. equals the price of the final good c. exceeds the total payments made to owners of productive resources used in the production

  The rise of radical challenges from farmers

The last quarter of the nineteenth century saw the rise of radical challenges from farmers and working people throughout the United States. To what economic, social and political changes were these groups responding? What were their successes and/or ..

  Use the mundell-fleming model

Use the Mundell-Fleming model to try to understand the basis for this criticism and show a possible policy that Germany might pursue that could have a beneficial impact on another member country of the euro zone. how do the equation(s) of the model (..

  Natural rate of unemployment

If the natural rate of unemployment is 4 percent and the actual rate of unemployment is 5 percent, Okun's law states that the output gap is ________ and the economy is in a(n) ________.

  What is your total dollar return from this investment

You’ve just opened a margin account with $15,000 at your local brokerage firm. You instruct your broker to purchase 800 shares of Landon Golf stock, which currently sells for $77 per share. Suppose the call money rate is 6.5 percent and your broker c..

  Calculate the growth rate of total capital income

Suppose the output per effective worker is production function is y=10k1/2, where k equals the amount of capital per effective worker and the capital lasts an average of 10 years. Calculate the growth rate of total capital income and the growth rate ..

  Represent risk averse-risk neutral or risk loving preference

For each of the following utility (of income) functions, decide whether they represent risk averse, risk neutral, or risk loving preferences: a) U(I) = 25 + 2I (risk neutral) b) U(I) = 2I^2 (risk loving) c) U(I) = 5I^0.5/2 (risk averse)

  How would that affect sallys budget constraint

Suppose that Sally has 112 hours of time per week to allocate between market work and household time, earns a wage of $12 per hour if she works, and receives $30 per week in non-labor income. Graph Sally's budget constraint. If Sally's market wage we..

  What is the current market value of the school bond

School has issued a new bond, facedd at $1000, maturing in 20 years. It pays interest semi annually, at 8% nominal. The nterest rate of similar School bonds has decreased to 6%. What is the current market value of the School bond.

  Represent use of money that is consistent with definition

Which of the following statements represent a use of money that is consistent with its definition?

  Aerospace products acquired new multispindle

A manufacturer of aerospace products acquired a new multispindle, multi-turret turning center for $250,000. The machine will generate new revenue of $80,000 per year. Operating costs for the machine will average $10,000 per year. The company uses an ..

  Is there any pure strategy nash equilibrium

The manager of a corporate division faces the possibility of an audit every year. She prefers to spend time preparing if she will be audited; otherwise, she would prefer to invest her time elsewhere. The auditor, who gets recognized for uncovering pr..

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