DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Fibonnacci
// calculates the nth fibonacci number
def fibonacci(number): if number == 0 or number == 1: return number; else: result = fibonacci(number-1) + fibonacci(number-2) return result






Comments
Snippets Manager replied on Wed, 2009/12/30 - 9:06pm
Snippets Manager replied on Sat, 2009/07/04 - 11:28am