My issue
Fibonacci Series
Given an integer
𝑁
N, output the
𝑁
𝑡
ℎ
N
th
term in the Fibonacci Series.
The Fibonacci Series is : 0 1 1 2 3 5 8…
Input Format
The first line contains an integer
𝑇
T, denoting the number of test cases.
The next
𝑇
T lines contain a single integer
𝑁
N.
Output Format
For each test case, output the
𝑁
𝑡
ℎ
N
th
term in the Fibonacci Series.
Constraints
1
≤
𝑇
≤
100
1≤T≤100
1
≤
𝑁
≤
100
1≤N≤100
Sample 1:
Input
Output
1
0
Sample 2:
Input
Output
2
1
Sample 3:
Input
Output
7
8
My code
def fib(n):
#Wri
Learning course: Design and Analysis of Algorithms
Problem Link: Fibonacci Series in Design and Analysis of Algorithms