Well, from the question, you can use this:
(Python)
def a(n):
return a(n - 1) + a(n - 2)
you can also use a list to store the items and print it out :D
Well, from the question, you can use this:
(Python)
def a(n):
return a(n - 1) + a(n - 2)
you can also use a list to store the items and print it out :D
you are wrong
def num(n):
if n==1 or n==2:
return 1
return num(n - 1) + num(n - 2)
it is the correct form