已解决


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

4 years 前

已解决


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

4 years 前

已解决


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

4 years 前

已解决


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

4 years 前

已解决


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

4 years 前

已解决


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

4 years 前

已解决


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

4 years 前

已解决


kmph to mps
convert kilometer per hour to meter per second

4 years 前

已解决


only input
Return the output without writing any code into the function.

4 years 前

已解决


Rounding
Round 10.67 and make 'y' equal to that number.

4 years 前

已解决


Square root of a number
Write a code that will output the square root of x.

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

4 years 前

已解决


Negative matrix
Change the sign of all elements in given matrix.

4 years 前

已解决


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

4 years 前

已解决


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

4 years 前

已解决


Tic Tac Toe FTW
Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

4 years 前

已解决


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

4 years 前

已解决


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

4 years 前

已解决


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

4 years 前

已解决


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

4 years 前

已解决


Concatenate two strings
Its very easy. Just concatenate two strings.

4 years 前

已解决


sum of non-primes
The sum of the non-primes no larger than 10 is 1+4+6+8+9+10=38 Find the sum of all the positive non-prime integers that do no...

4 years 前

已解决


reverse string
input='rama' output='amar'

4 years 前

已解决


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

4 years 前

已解决


index of n^2 in magic(n)
input=5 magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 ...

4 years 前

加载更多