Gelöst


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

18 Tage vor

Gelöst


Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

18 Tage vor

Gelöst


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

18 Tage vor

Gelöst


select the primes of a vector
Find the prime numbers in a vector

18 Tage vor

Gelöst


square root
Find square root of given number

18 Tage vor

Gelöst


cube of number
find cube of number

18 Tage vor

Gelöst


length of a vector
Find twice the length of a given vector.

18 Tage vor

Gelöst


Square a Number
Given an input x, return y, which is equal to the square of x.

18 Tage vor

Gelöst


Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

18 Tage vor

Gelöst


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

18 Tage vor

Gelöst


Negative Infinity
Round the given array a towards negative infinity.

18 Tage vor

Gelöst


Simple return on investment
Assume you have some money and want to invest all your money to stock market. You randomly select a stock and invest all your mo...

18 Tage vor

Gelöst


Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

18 Tage vor

Gelöst


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

18 Tage vor

Gelöst


Create a constant offset.
Add a constant offset to an array. Example a = [1 3 5 9] offset = 2 y = [3 5 7 11]

18 Tage vor

Gelöst


Laws of motion 5
Calculate the force is u are given mass and acceleration.

18 Tage vor

Gelöst


Bit to Gigabyte
1 bit = 1.25 × 10^-10 gigabytes | x is bit | y is gigabyte

18 Tage vor

Gelöst


Draw 'O' !
Given n as input, generate a n-by-n matrix 'O' using 0 and 1 . example: n=4 ans= [1 1 1 1 1 0 0 1 ...

18 Tage vor

Gelöst


Array of Ones
Create a 100 X 100 array of ones.

18 Tage vor

Gelöst


convert between ascii and characters
I have seen multiple problems like this but none of them have a robust test suite associated with them. The first input C is ...

18 Tage vor

Gelöst


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

18 Tage vor

Gelöst


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

18 Tage vor

Gelöst


determine the sum of the squares
if x = 4, the solution will be: y = 1^2+2^2+3^2+4^2=1+4+9+16 = 30.

18 Tage vor

Gelöst


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

18 Tage vor

Gelöst


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

18 Tage vor

Gelöst


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

18 Tage vor

Gelöst


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

18 Tage vor

Gelöst


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

18 Tage vor

Gelöst


Sum All Positive Elements
Output a scalar that is equal to the sum of all positive elements in a given vector/matrix. For Example: The sum of all positi...

18 Tage vor

Mehr laden