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

  The wbfk transport company operates throughout mainland

The WBFK Transport Company operates throughout mainland Australia. The company specialize in fast delivery of pallet-loads of goods from one WBFK depot to another WBFK depot. It does not do pickups at a customers premises nor does it deliver door to ..

  Management information systems

Discuss the pros and cons of selecting (outsourcing to) three different vendors to handle three different IT/IS activities.

  The user to enter the replacement cost of a building

Design a modular program that asks the user to enter the replacement cost of a building and than displays the minimum amount of insurance he or she should but for the property

  Evaluate the effectiveness of the physical and environmental

Evaluate the effectiveness of the physical and environmental security measures that the organization you researched used in regard to protecting its assets. Indicate improvements to the organization's security measures where applicable. Justify your ..

  Names and numbers of london-based suppliers

Give the relational algebra expression for the following English queries. 1. Get the supplier# who supply all the blue parts

  Design an active bandpass filter

design an active bandpass filter that meets the following specifications: center frequency, fc, 50 kHz

  Write and test an adding machine program

The program should stop when it gets an input that is 0, printing out the sum at that point. Use the SPIM system calls described on pages B-43 and B-45.

  Explain what your process was and how the experiment went

Write a 2- to 3-page paper to explain your choice. Explain what your process was and how the experiment went. Were you successful? What did you learn from the experience ? Experiment choice #1:  File Sharing Program

  Find a meta-analysis published in a journal

Find a meta-analysis published in a journal

  . what options does atrium have for acquiring a new system

Atrium Bio-Medical Supply is a medium sized regional supplier of medical and laboratory equipment.Since starting 12 years ago,Victoria Dawn has built Atrium into a competitive supply company across several metro areas,but her growth potential is l..

  A motor vehicle maintenance center wants to improve serv

A motor vehicle maintenance center wants to improve its services by using database management systems (DBMS) and data mining. What tables are needed in such a database and how can it help improve their 2.2, 3.2services?

  Arraylist and linkedlist classes

In Java Collection Framework, ArrayList and LinkedList classes are both implementations of the interface List. Give an example of a situation where an array list would be the better choice and one where a linked list would. Explain the reasons in ..

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