Solved


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

11 months ago

Solved


find "greatest common divisor" of two integer value
A function to find Greatest Common Divisor of two integer input E.G. x=-18 y=96 output should be +6 x=-18; y=96; >>your...

11 months ago

Solved


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

11 months ago

Solved


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

11 months ago

Solved


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

11 months ago

Solved


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

11 months ago

Solved


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

11 months ago

Solved


Fill a rectangle with 1x1 and 2x2 tiles
A 3x2 rectangle can be filled with 1x1 and 2x2 tiles in three ways: The colors merely distinguish the sizes of the tiles. A 3...

11 months ago

Solved


Resistance in a circuit
Two resistors with values of 6.0 ohms and 12 ohms are connected in parallel. This combination is connected in series with a 4 o...

11 months ago

Solved


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

11 months ago

Solved


surface of a spherical planet
you just discovered its circumference, that is the input.

11 months ago

Solved


World Cup 2018 Prediction!
Which team will be the winner?

11 months ago

Solved


Prime numbers between a , b.
Find all prime number between a & b (including a and b). example: a=100 b=120 y= [101 103 107 109 113]

11 months ago

Solved


Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

11 months ago

Solved


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

11 months ago

Solved


Draw a '9' in a zero matrix!

11 months ago

Solved


Draw a '3' in a zero matrix!

11 months ago

Solved


Draw a '7' in a zero matrix!

11 months ago

Solved


Draw a '0' in a one matrix!

11 months ago

Solved


Draw a '8' in a zero matrix!

11 months ago

Solved


Draw a '5' in a zero matrix!

11 months ago

Solved


Draw a '6' in a zero matrix!

11 months ago

Solved


Draw a '4' in a zero matrix!

11 months ago

Solved


Draw a '2' in a zero matrix!

11 months ago

Solved


Draw a '1' in a zero matrix!

11 months ago

Solved


Find x rows where the sum of the numbers is the maximum
Find x rows where the sum of the numbers is the maximum. For example: when x is 2 and m is 2 3 5 0 2 3 5 5 6 0 9 4 then y =...

11 months ago

Solved


Generate pi using logarithm
Generate pi using logarithm

11 months ago

Solved


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

11 months ago

Solved


Solve an ODE: first-order linear equation
In the fall semester of [redacted], my professor for a course on ordinary differential equations said, “There are two groups of ...

11 months ago

Load more