 ### Python program to find the Fibonacci sequence recursion

```DESCRIPTION: Fibonacci Series is a series of numbers in which each number is the sum of two preceding(previous) terms.The main function takes a number from the user and displays thesequence till that number.

#The main() function takes input from the user and displays the sequence
def main():

number = int(input(" Enter the number until the sequence is displayed: "))

def fibonacci( n ):
#if n is 1 or 2 , 1 is returned
#Assuming the series begins with 1
first, second = 1, 1
```
```        for i in range( n - 1 ) :

first, second = second, first + second

return first

for i in range( 1, number + 1 ):

print( fibonacci( i ))

#it calls the main function
if __name__ == "__main__":

main()

OUTPUT:
Test case
Enter the number until the sequence is displayed: 8
1
1
2
3
5
8
13
21``` #### More Articles of Anjani Dubey:

Name Views Likes
Python program to check if a Binary tree is height balanced or not 901 16
Python program to convert BST into MinHeap 447 18
Python program to delete an element into AVL Tree 870 19
Python program to insert an element in AVL Tree 473 27
Python program to delete an element in Binary search tree 442 18
Python program to insert and find an element in Binary Search Tree 513 18
Python program to insert an element in the Binary Tree 761 18
Python program to find height of the Binary Search Tree(BST) 574 11
Python program to combine two sorted lists and make another sorted list 418 16
Python program to convert multiple integers into single integer 727 22
Python program to convert Nested list into a flat list 526 17
Python program to convert tuple to a string 601 26
Python program for traversing the Tree in PreOrder, PostOrder and InOrder 741 13
Python program to find hash of a string 378 28
Python program for Counting sort Algorithm 307 13
Python program for Insertion sort Algorithm 499 23
Python program for Bubble Sort algorithm 384 12
Python program for UNIX domain socket UDP client 341 15
Python UNIX domain socket UDP server 422 24
Python program for Binary Search Tree 438 20
Python UNIX domain socket TCP Client 316 16
Python UNIX domain socket TCP Server 383 16
Python program to convert POS to SOP 341 15
Advantages of UNIX domain socket over Normal sockets 628 24
Python program for Merge Sort Algorithm 382 21
Python program to print duplicate characters and count from a string 1535 20
Python program to find all pairs of an integer array whose sum is equal to a given number 1192 18
Python program to find all Permutations of a string 347 11
Python program to reverse the string using recursion 444 15
Python program to check two strings are anagrams of each other 712 22
Python program to convert Hexadecimal to Decimal, Binary, Octal 1762 27
Python program to convert Octal to Decimal, Binary, Hexadecimal 1849 28
Python program to Shuffle deck of cards 907 18
Python program for One Dimensional Array 333 23
Python program to merge mails 334 19
Python program to display powers of 2 380 20
Python program to find numbers Divisible by Another number 1007 24
Python program to print strings 297 14
Python program to find Average of numbers 307 23
Python program to find the solutions for a Quadratic equation 772 18
Python program to generate Armstrong numbers for a specific range 253 17
Python program to calculate perimeter of Triangle 379 23
Python program to calculate perimeter of a Rectangle 303 18
Python program to calculate the factors of a number 255 11
Python program to calculate the Square root of a number 478 19
Python program to calculate the area of Rectangle 322 17
Python program to print the Floyd Triangle 278 15
Python program to find the sum of natural number using Recursion 326 17
Python program to find the Fibonacci sequence recursion 426 30
Python Program to check whether a number is Palindrome or not 498 11
Program to check whether a number is Palindrome or not 456 17
Program to find average of numbers 318 16
Program to solve the Quadratic Equation 358 19
Program to generate the Armstrong numbers for a specific range 307 21
Program to calculate the perimeter of triangle 342 22
Program to calculate the perimeter of rectangle 479 14
Program to Display the Fibonacci series using Recursion 241 14
Program to find factors of a number 275 18
Program to calculate Square root of a number 244 18
Program to calculate area of Rectangle 303 25
Python Program for calculating the Area of Triangle 294 22
Program to print the Floyd Triangle 268 20
Python Program to calculate the Grade of the Student 5961 21
Program to calculate sum of natural numbers using Recursion 254 18