Solved

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 ...

11 mois ago

Solved

Times 3 problem

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

11 mois ago

Solved

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

If x = 5, y = 5 * (5+5) * 5 = 250

11 mois ago

Solved

Kinetic Energy

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

11 mois ago

Solved

Square the input

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

11 mois ago

Solved

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...

11 mois ago

Solved

Find the area of a triangle

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

11 mois ago

Solved

Area of a circle

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

11 mois ago

Solved

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 ...

11 mois ago

Solved

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 ] ...

11 mois ago

Solved

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...

11 mois ago

Solved

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...

11 mois ago

Solved

Determine the square root

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

11 mois ago

Solved

Find the hypotenuse

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

11 mois ago

Solved

Create a Matrix of Zeros

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

11 mois ago

Solved

Divide by 4

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

11 mois ago

Solved

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 ...

11 mois ago

Solved

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...

11 mois ago

Solved

Weighted average

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

11 mois ago

Solved

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...

11 mois ago