Last active
June 5, 2022 15:37
-
-
Save PushkraJ99/85cd4d00d8daff133f72c0fafcd2a4c3 to your computer and use it in GitHub Desktop.
Fibonacci Sequence Using Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Fibonacci Sequence using Python (Github:-PushkraJ99) | |
| def fib(n): | |
| if (n<=1): | |
| return n | |
| else: | |
| return (fib(n-1)+fib(n-2)) | |
| num=int(input("Enter number:")) | |
| for u in range(num): | |
| print(fib(u)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment