Exercise 2: Fibonacci Sequence upto n Number Of Terms

In this exercise, you have to compute Fibonacci series up to n number

We'll cover the following

Problem Statement

In this exercise, you have to write Fibonacci Sequence of a given number.

  • You have to print the sequence up to the given range which is passed as a parameter to the test method.

  • Your code should return the string variable ans which will have all the Fibonacci values computed upto the given range appended in that string.

    • Here’s a link showing how you can add values to a string.

Get hands-on with 1400+ tech skills courses.