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

  Initial allocation of cheese also bread is pareto efficient

Draw the Edge worth Box diagram for this economy also Explicate whether the initial allocation of cheese also bread is Pareto efficient.

  Find shellys optimal amount of consumption and leisure

Shellys preferences for consumption and leisure can be expressed as U(C, L) = (C − 200)(L − 80) (1) This utility function implies that Shellys marginal utility of leisure is C − 200 and her marginal utility of consumption is L − 80. Find Shellys opti..

  Dollar and yen exchange rate

Suppose that the dollar/yen exchange rate on 1/1/2015 was ¥120/$. One month later, the rate was ¥115/$. If the J-curve theory holds, which of the following situations would occur, all else being equal?

  Considering the taxation policies

A price-taking firm in the X industry has the following (pre-tax) total short-run cost function: TC = 50 +30Q + Q^2. Price equals $130. The government is considering the following taxation policies: (a) A per-unit tax of $20/unit, (b) A tax of profit..

  Explain what is meant by sustainability in different context

Explain what is meant by sustainability in different contexts? What is meant by "ecological footprint", "tipping point", and "life-cycle analysis" of a product? Is there such thing like a good economic growth and bad economic growth? Explain with exa..

  Learning and growth and internal business process

ZZ Tire Company started as retail installer of tires on cars 10 years ago. They now have 400 retail stores, installing about 10,000 tires per store per year and selling a total of 4 million tires. 5 years ago, they decided to start manufacturing thei..

  What would the profit of restaurant be after price change

A restaurant/bar is analyzing its pricing of beer. It has determined that the price elasticity of demand for beer is −0.8; the cross-price elasticity for wine with respect to the price of beer is 0.9; the cross-price elasticity for appetizers is -1.4..

  Assume the country begins in external balance

Capital mobility is fairly high, so the fe curve is more shallowly sloped than the lm curve. the country has a fixed exchange rate. Using is-lm-fe analysis, show what will happen if the country pursues an expansionary fiscal policy. Use graphs and ex..

  Will workers utility be greater under negative income tax

Consider a person who can work up to 80 hours each week at a pre-tax wage of $20 per hour but faces a constant 20% payroll tax. Under these conditions, the worker maximizes her utility by choosing to work 50 hours each week. Show that the worker will..

  Decrease in the governments budget deficit

A decrease in the government's budget deficit ______ the real interest rate and ______the equilibrium quantity of national saving.

  Horizontal merger between two firms with sales

An industry consists of three firms with sales of $200,000, $710,000, and $325,000. a. Calculate the Herfindahl-Hirschman index (HHI). Instruction: Round to the nearest integer. b. Calculate the four-firm concentration ratio (C4). c. Based on the FTC..

  Q1 do you believe economic darwinism is reflected in the us

q1. do you believe economic darwinism is reflected in the us banking policy of some banks are too big to fail

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