forked from devpro-br/lista-de-exercicios-python-brasil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feita correção do exercício 15 da seção de repetição.
close devpro-br#33
- Loading branch information
1 parent
ce39263
commit fbbd10d
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
Exercício 15 da seção de estrutura sequencial da Python Brasil: | ||
https://wiki.python.org.br/EstruturaDeRepeticao | ||
A série de Fibonacci é formada pela seqüência 1,1,2,3,5,8,13,21,34,55,... Faça um programa capaz de gerar a série até o | ||
n−ésimo termo. | ||
>>> calcular_serie_de_fibonacci(1) | ||
'1' | ||
>>> calcular_serie_de_fibonacci(2) | ||
'1, 1' | ||
>>> calcular_serie_de_fibonacci(3) | ||
'1, 1, 2' | ||
>>> calcular_serie_de_fibonacci(4) | ||
'1, 1, 2, 3' | ||
>>> calcular_serie_de_fibonacci(5) | ||
'1, 1, 2, 3, 5' | ||
>>> calcular_serie_de_fibonacci(6) | ||
'1, 1, 2, 3, 5, 8' | ||
>>> calcular_serie_de_fibonacci(7) | ||
'1, 1, 2, 3, 5, 8, 13' | ||
""" | ||
|
||
|
||
def calcular_serie_de_fibonacci(n: int) -> str: | ||
"""Escreva aqui em baixo a sua solução""" |