def fibonacci(n) :
if n==0 or n==1 :
return 1
else :
return fibonacci(n-1) + fibonacci(n-2)
Like common speaking huh? seems pseudo code ! Now imagine you have decided to implement an algorithm (a very hard and comprehensive one) with python. Believe me,It takes 30 min in max :)
No comments:
Post a Comment