W3snippets
  • Home
  • Php
  • Jquery
  • Css
  • Html
  • Codeigniter
  • Laravel
  • Nodejs
  • Javascript
  • Python

Python Program for n-th Fibonacci number

In this article, We will explain to you python program for n-th Fibonacci number. so you can see our python example.

Example

def Fibonacci(n):
    if n<= 0:
        print("Incorrect input")
    elif n == 1:
        return 0
    elif n == 2:
        return 1
    else:
        return Fibonacci(n-1)+Fibonacci(n-2) 
print(Fibonacci(10))

Output

34

Related Article

  • Python Program for Find minimum sum of factors of number
  • check if a triangle of positive area is possible with the given angles in python
  • Python Program for Find minimum sum of factors of number
  • Python Program to find sum of array
  • Python Program for cube sum of first n natural numbers

Recent Posts

  • How to get the tag name in jQuery
  • How to get html tag in javascript
  • PHP fopen() function with example
  • PHP rand() function with example
  • PHP sqrt() function with example
  • PHP pow() function with example
  • PHP max() function with example
  • PHP min() function with example

Popular Posts

  • PHP ucfirst() function with example
  • PHP fopen() function with example
  • JQuery Get
  • JQuery CSS Classes
  • Laravel Cookie
  • JQuery Traversing
  • JQuery Dimensions
  • How to get the tag name in jQuery

W3snippets

Quick Links

  • About Us
  • Contact Us
  • Terms & Conditions
  • Privacy Policy

We are providing

  • Web Design
  • Web Development
  • Product Management
  • Marketing
  • Graphic Design

Our Social Networks

© Copyright W3snippets. All Rights Reserved