Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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]

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr 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 ...

etwa ein Jahr vor

Gelöst


Draw a '9' in a zero matrix!

etwa ein Jahr vor

Gelöst


Draw a '3' in a zero matrix!

etwa ein Jahr vor

Gelöst


Draw a '7' in a zero matrix!

etwa ein Jahr vor

Gelöst


Draw a '0' in a one matrix!

etwa ein Jahr vor

Gelöst


Draw a '8' in a zero matrix!

etwa ein Jahr vor

Gelöst


Draw a '5' in a zero matrix!

etwa ein Jahr vor

Gelöst


Draw a '6' in a zero matrix!

etwa ein Jahr vor

Gelöst


Draw a '4' in a zero matrix!

etwa ein Jahr vor

Gelöst


Draw a '2' in a zero matrix!

etwa ein Jahr vor

Gelöst


Draw a '1' in a zero matrix!

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


Generate pi using logarithm
Generate pi using logarithm

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Mehr laden