Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The Fibonacci sequence, named after Italian mathematician Leonardo of Pisa (also known as Fibonacci), is a series of numbers in which each number is the
The Fibonacci sequence, named after Italian mathematician Leonardo of Pisa (also known as Fibonacci), is a series of numbers in which each number is the sum of the two preceding ones, starting from 0 and 1 . The following are the first few numbers of the Fibonacci squence: 0,1,1,2,3,5,8,13,21,34, The first two numbers in the sequence are 0 and 1 , and each subsequent number is the sum of the previous two. The sequence continues infinitely, with each number being of the two preceding ones. The Fibonacci sequence appears in many different areas of mathematics and science, including number theory, combinatorics, and the growth of plants and animals. It also has many practical applications in computer science, finance, and cryptography. Draw a flowchart and write a pseudocode as well as a python script that generates a number of Fibonacci sequences. The script starts by asking the user how many Fibonaci sequences they want to generate and then for each iteration, the program asks the user what is the number of items they want to generate. The following is a sample outpur script: How many Fibonacci sequences do you want to generate? 2 How many terms? 4 Fibonacci sequence: 0 1 1 2 How many terms? 10 Fibonacci sequence: 0 1 1 2 3 5 8 12 How many terms? 10 Fibonaci sequence: 0112358132134 The script should also check, for each iteration, if the entered number of items is equal or less than zero and if this is the case print a message that the number should beater than zero. Still if this is the case, this will count as one of the number of sequences the user wants to generate. For example: How many Fibonacci sequences do you want to generate? 2 How many terms? 0 Please enter a positive integer How many terms? 5 Fibonacci sequence: 0 1 1 2 3 (Ungraded challenge: rewrite the script in a way that it does not count a negative or zero number of terms as one iteration). Submit your pseudocode, flowchart and script as per the submission rules
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