Community Profile

# Nuwan Senevirathne

129 total contributions since 2019

View details...

Contributions in
View by

Solved

Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

11 mois ago

Solved

Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

11 mois ago

Solved

Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<http://upload...

11 mois ago

Solved

Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

11 mois ago

Solved

Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

11 mois ago

Solved

Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

11 mois ago

Solved

Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

11 mois ago

Solved

Energy of a photon
*&#9883 &#9762 &#9883 &#9762 &#9883 &#9762 &#9883* Given the frequency F of a photon in giga hertz. Find energy E of this...

11 mois ago

Solved

Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

11 mois ago

Solved

Remove the Zero
Given an array n, remove all zeros

11 mois ago

Solved

11 mois ago

Solved

Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

11 mois ago

Solved

Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

11 mois ago

Solved

Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

11 mois ago

Solved

Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

11 mois ago

Solved

Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

11 mois ago

Solved

Find max
Find the maximum value of a given vector or matrix.

11 mois ago

Solved

Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

11 mois ago

Solved

Get the length of a given vector
Given a vector x, the output y should equal the length of x.

11 mois ago

Solved

inner product of two vectors
inner product of two vectors

11 mois ago

Solved

Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

11 mois ago

Solved

Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

11 mois ago

Solved

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

11 mois ago

Solved

Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

11 mois ago

Solved

Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

11 mois ago

Solved

kmph to mps
convert kilometer per hour to meter per second

11 mois ago

Solved

Number of problems
No, you don't read it wrong: this assignment is to return the number of this problem (and not the problem of this number).

11 mois ago

Solved

Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

11 mois ago

Solved

Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.

11 mois ago

Solved

Rotate matrix by -90 degrees
Rotate a Matrix by -90 degrees Example: X = 1 2 3 4 5 6 7 8 9 output = 7 4 ...

11 mois ago