Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


Laws of motion 6

circa 3 anni fa

Risolto


Laws of motion 5

circa 3 anni fa

Risolto


Laws of motion 4

circa 3 anni fa

Risolto


Laws of motion 3

circa 3 anni fa

Risolto


Laws of motion 2

circa 3 anni fa

Risolto


Laws of motion 1

circa 3 anni fa

Risolto


Total energy

circa 3 anni fa

Risolto


Potential energy calculation

circa 3 anni fa

Risolto


Kinetic energy calculation

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


Add two numbers
Add two numbers (For beginners)

circa 3 anni fa

Risolto


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.

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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.

circa 3 anni fa

Carica altro