Question
The Fibonacci sequence is one of the most commonly found patterns in all of nature. The sequence starts with 0 and 1 , and then
a. Write a recursive algorithm in pseudocode to generate the Fibonacci sequence.
b. Write an iterative algorithm in pseudocode to generate the Fibonacci sequence.
c. Which algorithm would probably work better on a computer, and why?
d. Write an algorithm in pseudocode 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).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started