[R-br] RES: Função usando sample [RESOLVIDO]