A résolu


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

plus de 5 ans il y a

A résolu


Times 3 problem
When you enter the number, it should return the number multiplied by 3

plus de 5 ans il y a

A résolu


y equals x divided by 2
function y = x/2

plus de 5 ans il y a

A résolu


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

plus de 5 ans il y a

A résolu


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

plus de 5 ans il y a

A résolu


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

plus de 5 ans il y a

A résolu


Calculate square and cube of number
Calculate square and cube of number x

plus de 5 ans il y a

A résolu


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

plus de 5 ans il y a

A résolu


Area of rhombus
Calculate the rhombus area

plus de 5 ans il y a

A résolu


square root
Find the square root (y) of an input (x).

plus de 5 ans il y a

A résolu


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

plus de 5 ans il y a

A résolu


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

plus de 5 ans il y a

A résolu


Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z. Examples: Inputs x = 2, y = 4 Output z is 6 ...

plus de 5 ans il y a

A résolu


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

plus de 5 ans il y a

A résolu


Reverse a matrix
Its simple. You have to reverse a given matrix.

plus de 5 ans il y a

A résolu


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

plus de 5 ans il y a

A résolu


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

plus de 5 ans il y a

A résolu


Add two numbers
Add two numbers (For beginners)

plus de 5 ans il y a

A résolu


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

plus de 5 ans il y a

A résolu


Determine the square root
Determine the square root of the value the user has entered, n.

plus de 5 ans il y a

A résolu


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

plus de 5 ans il y a

A résolu


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

plus de 5 ans il y a

A résolu


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

plus de 5 ans il y a

A résolu


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

plus de 5 ans il y a

A résolu


Return area of square
Side of square=input=a Area=output=b

plus de 5 ans il y a

A résolu


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

plus de 5 ans il y a

A résolu


Will there be a new leader?
Simply answer the title.

plus de 5 ans il y a

A résolu


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

plus de 5 ans il y a

A résolu


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

plus de 5 ans il y a

A résolu


Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

plus de 5 ans il y a

Charger plus