Home > Technology > My First Python Program

My First Python Program

This is the fibonacci number program in python

def fibo(n) :

if n==0 :
return 0
elif n==1 :
return 1
else :
return fibo(n-1)+fibo(n-2)
print fibo(3)
print fibo(9)
print fibo(13)

This is my first ever Python program. Using IDLE(interactive python GUI). Python is really cool language and its easy too!!


  1. kali
    September 26, 2010 at 4:25 pm

    i need how to work with python in windows and ubuntu.
    advance thanks.

    • September 26, 2010 at 4:44 pm

      Ya surely I’ll post how to configure python in windows its very easy too…

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: