Created
July 15, 2014 02:44
-
-
Save alexandre/abc3a90f70a2e6d4ca5e to your computer and use it in GitHub Desktop.
brincando com fibseq...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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