-
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.
- Loading branch information
1 parent
a4b313a
commit dbfb580
Showing
1 changed file
with
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# FizzBuzz\n", | ||
"Data: 29/03/2024. De: Codewars. Link para kata(https://www.codewars.com/kata/5a622f5f85bef7a9e90009e2/train/python).\n", | ||
"\n", | ||
"Descrição\n", | ||
"FizzBuzz é frequentemente um dos primeiros quebra-cabeças de programação que as pessoas aprendem. Agora, desfaça-o com o inverso do FizzBuzz!\n", | ||
"\n", | ||
"Escreva uma função que aceita uma string, que sempre será uma seção válida do FizzBuzz. Sua função deve retornar um array que contenha os números na ordem para gerar a seção fornecida do FizzBuzz.\n", | ||
"\n", | ||
"Notas\n", | ||
"\n", | ||
"Se a sequência puder aparecer várias vezes dentro do FizzBuzz, retorne os números que geram a primeira instância dessa sequência.\n", | ||
"Todos os números na sequência serão maiores que zero.\n", | ||
"Você nunca receberá uma sequência vazia.\n", | ||
"Exemplos\n", | ||
"\n", | ||
"reverse_fizzbuzz(\"1 2 Fizz 4 Buzz\") --> [1, 2, 3, 4, 5]\n", | ||
"reverse_fizzbuzz(\"Fizz 688 689 FizzBuzz\") --> [687, 688, 689, 690]\n", | ||
"reverse_fizzbuzz(\"Fizz Buzz\") --> [9, 10]" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"def inverso_fizzbuzz(st):\n", | ||
" pass" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"\n", | ||
"print(inverso_fizzbuzz(\"1 2 Fizz 4 Buzz\")) # expects [1, 2, 3, 4, 5]\n", | ||
"print(inverso_fizzbuzz(\"Fizz 688 689 FizzBuzz\")) # expects [687, 688, 689, 690]\n", | ||
"print(inverso_fizzbuzz(\"Fizz Buzz\")) # expects [9, 10]" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"language_info": { | ||
"name": "python" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |