Which algorithm would probably work better on a computer

Assignment Help Basic Computer Science
Reference no: EM131110076

The Fibonacci sequence is one of the most commonly found patterns in all of nature. The sequence starts with 0 and 1 , and then each term in the sequence is generated by adding the previous two terms. The first few terms in the sequence are 0,1,1 , 2, 3, 5, 8,13 , 21 , and 34. Numbers that appear in the sequence are called Fibonacci numbers.

a. Write a recursive algorithm in pseudo code to generate the Fibonacci sequence.

b. Write an iterative algorithm in pseudo code to generate the Fibonacci sequence.

c. Which algorithm would probably work better on a computer, and why?

d. Write an algorithm in pseudo code to test a number to see if it is a Fibonacci number.

e. Create an Alice world with a Count penguin and a Fibonacci penguin. Count penguin will simply start counting slowly when the world starts. The Fibonacci penguin will jump up and down and flap its wings while saying "Fibonacci, Fibonacci, (n) is Fibonacci!" when Count penguin says a number that is part of the Fibonacci sequence. The Fibonacci penguin should say the actual number in place of (n).

Reference no: EM131110076

Questions Cloud

Explain the contract law that the court applied to the case : From the e-Activity, discuss the major issues addressed in the case you found. Explain the contract law that the court applied to the case and why
Write the vhdl entity declare for a three-input and gate : Write the VHDL entity declare for a three-input AND gate. Write the VHDL architecture for a three-input AND gate. Draw the logic circuit to be implemented by the following VHDL architecture body:
What conclusion did the court reach regarding main dispute : What rule of law, statute, or constitutional provision was used by the Court to resolve the dispute? Explain , What conclusion/decision did the Court reach regarding the main dispute/issue?
Assume that ibm leased equipment that was carried at a cost : Assume that IBM leased equipment that was carried at a cost of $150,000 to Sharon Swander Company. The term of the lease is 6 years beginning January 1, 2011, with equal rental payments of $30,044 at the beginning of each year.
Which algorithm would probably work better on a computer : Write a recursive algorithm in pseudo code to generate the Fibonacci sequence.
What liability would you have for any contracts : What would the default be if you did not have an express agreement and did not choose a specific form of business organization? What liability would you have for any contracts or torts done for the benefit of and in the course of the business
How should evacuation plans be established : Proactive action plans are designed to protect the personnel that work in a particular building. How should evacuation plans be established? To where should those evacuated be relocated? How should these plans be practiced?
Imitate biological organic functions : 1. Composites designed to be insulators, conductors of heat, electricity etc., special electromagnetic properties while maintaining other special properties (these are more traditional multifunctional composites).2. Biologically based or inspired mat..
Jana kingston corporation enters into a lease : Jana Kingston Corporation enters into a lease on January 1, 2011, that does not transfer ownership or contain a bargain-purchase option.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Recommend for naming files in business

What kinds of rules would your recommend for naming files in business? For personal use?

  Corresponding value in the range

In rental income worksheet, project the income and expense associated with owning the condo. In cell b6, enter the year 1 rental income as equal to 1/12 of the assessed value of the condo from the real estate data worksheet. In the range B7:K7 ent..

  Who are the typical system stakeholders

Who are the typical system stakeholders

  Employee privacy expectations concerning mobile devices

Propose an organizational policy that addresses both business needs and employee privacy expectations concerning mobile devices. How would the policy differ from employer provided and bring your own devices?

  Compute monthly payment for car

Compute the monthly payment for $ 22,000 car with a $3,500 down payment and $500 trade-in if term of loan is 5 years and the annual interest rate is 5%.

  Half sales office and half business office users

Create a 1-page network diagram showing the components and devices needed to build a simple office network based on the following scenario: 50 employees, half Sales office and half Business office users

  Create a context diagram for the new billing system

Create a Context Diagram and a Diagram 0 for the new billing and payment system.

  The leading business organizations

Boardman Management Group is one of the leading business organizations of today's time. They are planning to make a resort, Baderman Island Resort. The overall organization is vastly spread in number of countries. It has numerous branches in al..

  What is the size of one second of filming

You are a movie producer. You have ordered film to be shot at a resoluton of 2002 x 3000 at 64 bit color. What is the size of one frame, WHat is the size of one second of filming and What is the total size of the file

  What might affect a spreadsheet developers choice

Excel allows you to display a system date using the date stamp and the NOW function. When might a date stamp be important? Why? What might affect a spreadsheet developer's choice for the date format used to display the date.

  Write a problem that prompts the user for a radius

Write a problem that prompts the user for a radius and then prints: •The area and the circumference of a circle with that radius •The volume and surface area of a sphere with that radius

  First describe the mission of each organization

First describe the mission of each organization, as found on their web site.  Discuss how each organization has been targeted in the recent past for cyberattack(s), as reported in news or journal articles.  Describe the suspected threat actors.  Disc..

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