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
from random import sample | |
from collections import defaultdict | |
RODADAS = 7 | |
EVENTOS = [-2, -1, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2] | |
def simular_partida(): | |
eventos_da_partida = sample(EVENTOS, RODADAS) |
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
ARTIGOS = ["da", "de", "do", "das", "dos"] | |
PARENTESCOS = ["FILHO", "FILHA", "NETO", "NETA", "SOBRINHO", "SOBRINHA", "JUNIOR"] | |
def formatar_nome(nome): | |
if nome is None: | |
raise ValueError("Nome é obrigatório!") | |
if type(nome) != str: |