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

environ 3 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

environ 3 ans il y a

A résolu


04 - Scalar Equations 2
Define the variables a and b: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b.png>...

environ 3 ans il y a

A résolu


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

environ 3 ans il y a

A résolu


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

environ 3 ans il y a

A résolu


Convert degrees to radians
Given input in degrees, output to radians

environ 3 ans il y a

A résolu


Convert radians to degrees
Given input in radians, output to degrees

environ 3 ans il y a

A résolu


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

environ 3 ans il y a

A résolu


Laws of motion 6

environ 3 ans il y a

A résolu


Laws of motion 5

environ 3 ans il y a

A résolu


Laws of motion 4

environ 3 ans il y a

A résolu


Laws of motion 3

environ 3 ans il y a

A résolu


Laws of motion 2

environ 3 ans il y a

A résolu


Laws of motion 1

environ 3 ans il y a

A résolu


Total energy

environ 3 ans il y a

A résolu


Potential energy calculation

environ 3 ans il y a

A résolu


Kinetic energy calculation

environ 3 ans il y a

A résolu


Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

environ 3 ans il y a

A résolu


Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

environ 3 ans il y a

A résolu


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

environ 3 ans il y a

A résolu


Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and ...

environ 3 ans il y a

A résolu


Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

environ 3 ans il y a

A résolu


Find the largest number
Find the largest number |x| among 4 numbers given as variables |a|, |b|, |c|, and |d|. Example: Input: a = 4; b = 7; c ...

environ 3 ans il y a

A résolu


Min of a Matrix
Return the minimum value in the given matrix.

environ 3 ans il y a

A résolu


Add two numbers
Add two numbers (For beginners)

environ 3 ans il y a

A résolu


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.

environ 3 ans il y a

A résolu


Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

environ 3 ans il y a

A résolu


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

environ 3 ans il y a

A résolu


Sum of adjacent elements in a vector
Given a vector v, return a vector s containting the sum of every two adjacent elements in the vector. Every element s(i) cont...

environ 3 ans il y a

A résolu


Determine if input is divisible by three.
Given a positive integer, n, determine if n is divisible by 3. If yes, the function should output true. If no, false.

environ 3 ans il y a

Charger plus