Gelöst


Número Repetido
Dado um número inteiro N, verifique se o número é composto apenas do mesmo inteiro VerificaRepetido(123) = false; VerificaRepe...

mehr als 3 Jahre vor

Gelöst


Fizz
Dado um número inteiro n, retorne 'fizz' se esse valor for multiplo de 3, ou retorne o valor caso contrario. Fizz(3) = 'fizz'; ...

mehr als 3 Jahre vor

Gelöst


Matrizes Multiplicaveis
Dadas duas matrizes M1 e M2, verifique se as matrizes podem ser multiplicadas uma pela outra M1 = [1 2 3; 4 5 6] M2 = [7; 8; 9...

mehr als 3 Jahre vor

Gelöst


Maior Primo
Dado um valor inteiro N, qual o maior valor primo <= N MaiorPrimo(5) = 5; MaiorPrimo(10) = 7;

mehr als 3 Jahre vor

Gelöst


Tabuada
Dado um inteiro N, retorne um vetor contendo a tabuada de N de 1 a 10; ex: Tabuada(5) = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50...

mehr als 3 Jahre vor

Gelöst


Tipos de Triangulos
Dados os tamanhos dos lados de um triangulos A, B e C. Retorne qual o tipo do triangulo: 'equilátero', 'escaleno' ou 'isósceles'...

mehr als 3 Jahre vor

Gelöst


Letras Maisculas
Dado uma string A, retorne apenas os caracteres maiúsculos de A Maiusculas('Hello World') = 'HW';

mehr als 3 Jahre vor

Gelöst


Triangulo Semelhante
Dados dois vetores A = (a1, a2, a3) e B = (b1, b2, b3) sendo referentes a arestas de triangulos. Verifique se os triangulos são ...

mehr als 3 Jahre vor

Gelöst


Buzz
Dado um número inteiro n, retorne 'buzz' se esse valor for multiplo de 5, ou retorne o valor caso contrario. Buzz(5) = 'buzz'; ...

mehr als 3 Jahre vor

Gelöst


Juros Compostos
Faça uma função que receba um capital inicial (C), uma taxa de juros a ser aplicada (i) e um tempo (t) para qual será aplicado o...

mehr als 3 Jahre vor

Gelöst


List numbers that are not squares
The numbers 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, etc. are not perfect squares. Write a function to list the th term in ...

mehr als 3 Jahre vor

Gelöst


compter le nombre de zéros dans une matrice
écrire une fonction count_zeros qui prend en entrée une matrice M et détermine le nombre de zéros dans une matrice

mehr als 3 Jahre vor

Gelöst


sinus de pulsation a
Ecrire une fonction sinat qui prend en entrée un vecteur t (de valeurs croissantes) et renvoie un vecteur y de de même dimensi...

mehr als 3 Jahre vor

Gelöst


Intrication de deux vecteurs
Ecrire une fonction "intric" qui prend en entrée un vecteur ligne v1 et un vecteur ligne v2 et renvoie le vecteur ligne vres don...

mehr als 3 Jahre vor

Gelöst


Dominant Matrix - 01
A matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in a row is large...

mehr als 3 Jahre vor

Gelöst


Play Outside In with primes

mehr als 3 Jahre vor

Gelöst


List Proth primes

mehr als 3 Jahre vor

Gelöst


Count the primes in Collatz sequences
Several Cody problems (21, 69, 42937, 44448, 44784, 52422) involve Collatz sequences. These start with a seed . If is odd, the ...

mehr als 3 Jahre vor

Gelöst


Find all prime factors of the input
Given an input x, find its all prime factors. Return the vector with all factors in ascending order. Efficiency is the key here...

mehr als 3 Jahre vor

Gelöst


Find distance travelled by an object starting from rest in time 't' and linear acceleration 'a' = 3t
Find distance travelled by an object starting from rest in time 't' with linear acceleration a = 3t. You are given time t as an ...

mehr als 3 Jahre vor

Gelöst


Draw 'W'
For any given n, return a matrix of height n and width 4n-3 containing a W of ones. Example: n=2 ans= [1 0 1 0 1 0 1 0 1 0...

mehr als 3 Jahre vor

Gelöst


Vector slither sort!
Sort a numeric vector in the following format: [largest value, smallest value, second largest value, second smallest value, etc...

mehr als 3 Jahre vor

Gelöst


determine skid distance of car
Determine the distance a car skids to a stop given initial velocity (v) and time (t).

mehr als 3 Jahre vor

Gelöst


Matrix Quadrants
Write a function that takes N as the input, and outputs a matrix whose upper-left (NxN) quadrant contains all ones, the lower-ri...

mehr als 3 Jahre vor

Gelöst


Find Closest Constant
Given a number x, return the value that is closest to x from this list of constants: 0, 1, , e, , (also known as ). For exampl...

mehr als 3 Jahre vor

Gelöst


Determine if x is a combination of m and n
Given positive integers x, m, and n, determine if x can be written as x = am + bn for any (non-negative) integers a and b. Your ...

mehr als 3 Jahre vor

Gelöst


Calculating Student Grades
The matrix grades contains raw grades for 7 students who took your course. Each row represents a different student. The first 7 ...

mehr als 3 Jahre vor

Gelöst


Calculate the mean of each half of a matrix
Given a matrix with an even number of columns, n, return a 1-by-2 row vector where the first element is the mean of all the elem...

mehr als 3 Jahre vor

Gelöst


Create an arrow matrix
An arrow matrix is a square matrix that contains ones on the diagonal, the last column, and last row. ...

mehr als 3 Jahre vor

Mehr laden