Resuelto


kmph to mph converter
Convert the speed in miles/hour to km/hour.

alrededor de 2 años hace

Resuelto


Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

alrededor de 2 años hace

Resuelto


Display negative numbers
Given array,x, display all the negative numbers and display output as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

alrededor de 2 años hace

Resuelto


Create a constant offset.
Add a constant offset to an array. Example a = [1 3 5 9] offset = 2 y = [3 5 7 11]

alrededor de 2 años hace

Resuelto


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

alrededor de 2 años hace

Resuelto


Cos Function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

alrededor de 2 años hace

Resuelto


Area of polygon
Given the vertices in vectors X,Y, return the area of the polygon they define.

alrededor de 2 años hace

Resuelto


Simple polynomial evaluation
Compute the value of a polynomial of degree n with all coefficients '1', at value x. n is always n>=0. p(x)=1+x+x^2+...+x^n...

alrededor de 2 años hace

Resuelto


Polynomial evaluation
Compute the value of a polynomial of degree n with coeffcients in vector a, at value x. p(x)=a(1)+a(2)x+a(3)x^2+...+a(n+1)x...

alrededor de 2 años hace

Resuelto


Alternate elements!
Write a function that combines two lists by alternating the elements, e.g. ['a','b','c'], ['1','2','3'] → 'a1b2c3'.

alrededor de 2 años hace

Resuelto


Sum of integers numbers
Sum of the numbers from 1 to 100

alrededor de 2 años hace

Resuelto


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

alrededor de 2 años hace

Resuelto


Round to Nearest Multiple of 10^n

alrededor de 2 años hace

Resuelto


Draw a x-by-x matrix 'Denmark flag'(Euro(2020)
Draw a x-by-x matrix 'Denmark flag' using '4' and '1'.(x is odd and bigger than 4) Number 4: Caption S.Kjær and number 1: K.S...

alrededor de 2 años hace

Resuelto


Draw matrix 'Swiss flag'( Euro 2020)
Draw a x-by-x matrix 'Swiss flag' using '0' and '1'.(x is odd and bigger than 4) Example x=5 ...

alrededor de 2 años hace

Resuelto


convert between ascii and characters
I have seen multiple problems like this but none of them have a robust test suite associated with them. The first input C is ...

alrededor de 2 años hace

Resuelto


Add consecutive integer numbers
Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

alrededor de 2 años hace

Resuelto


How long does it take to run a bath?
Given the *volume flow rate* (volume/time) of a faucet and the *volume* of a bath tub, find the amount of time it takes to fill ...

alrededor de 2 años hace

Resuelto


Area of a pentagon
Given the side of a regular pentagon and its apothem return the area of pentagon. Remember the area of pentagon is calculate ...

alrededor de 2 años hace

Resuelto


How many complete pizzas
x is a vector with numbers of pizza slices. A corresponding vector n indicates in how many slices the pizza slices of x were cut...

alrededor de 2 años hace

Resuelto


Binary Inversion
Given the unsigned 8-bit integer x, return the number y which is the binary inversion of x. For example if x is 5, y should b...

alrededor de 2 años hace

Resuelto


Count the numbers
In a array x, count the number of times the number n appears in x. for example: x = [1 2 3 4 3 2 1 2] and n = 2 the answer sh...

alrededor de 2 años hace

Resuelto


All odd - all even
All odd numbers in x are added, while all even numers are subtracted from this. example: x = [1 2 3 4 5]; y = +(1+3+5)-...

alrededor de 2 años hace

Resuelto


sum of ASCII
Given a string x, return the sum of all ASCII numbers of all characters. for example, if x='lala' ('l'-> 108, 'a'->97) then y...

alrededor de 2 años hace

Resuelto


Add the even numbers
Add only the even numbers of x example: x = [1 2 3 4 5] the positive numbers are: 2 4, so their sum is 6

alrededor de 2 años hace

Resuelto


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

alrededor de 2 años hace

Resuelto


Odd times even numbers in a matrix
First count the number of odd numbers in x, then the number of even. Return their product. example: x = [1 2] One odd ...

alrededor de 2 años hace

Resuelto


Magnitude of a vector
Given a vector x, what is its magnitude?

alrededor de 2 años hace

Resuelto


Finding sum of even numbers in a vector.
Find the sum of all the even numbers present in the input vector x. Examples: Input x = [1 2 3 4] Output y is 6 Input...

alrededor de 2 años hace

Resuelto


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

alrededor de 2 años hace

Cargar más