Skip to content

Instantly share code, notes, and snippets.

@alexandre
Created July 15, 2014 02:44
Show Gist options
  • Select an option

  • Save alexandre/abc3a90f70a2e6d4ca5e to your computer and use it in GitHub Desktop.

Select an option

Save alexandre/abc3a90f70a2e6d4ca5e to your computer and use it in GitHub Desktop.
brincando com fibseq...
seq = [0,1]
def fibseq(maxnum, item=1):
(item <= maxnum and
(seq.append(item), fibseq(maxnum, item + seq[-2])))
fibseq(input('Max. Element.: '))
print(seq)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment