Solved


Is this is a Tic Tac Toe X Win?
For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

ongeveer 6 jaar ago

Solved


"Cody" * 5 == "CodyCodyCodyCodyCody"
*Alice*: What? *"Cody" * 5 == "CodyCodyCodyCodyCody"*? You've gotta be kidding me! *Bob*: No, I am serious! Python supports...

ongeveer 6 jaar ago

Solved


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

ongeveer 6 jaar ago

Solved


Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

ongeveer 6 jaar ago

Solved


Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

ongeveer 6 jaar ago

Solved


Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...

meer dan 6 jaar ago

Solved


Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
Submit your answer to this problem a multiple of 5 seconds after the hour. Your answer is irrelevant; the only thing that matte...

meer dan 6 jaar ago

Solved


Are all the three given point in the same line?
In this problem the input is the coordinate of the three points in a XY plane? P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) how can...

bijna 7 jaar ago

Solved


Get the elements of diagonal and antidiagonal for any m-by-n matrix
In the problem <http://www.mathworks.com/matlabcentral/cody/problems/858-permute-diagonal-and-antidiagonal Problem 858. Permute ...

bijna 7 jaar ago

Solved


Your favourite city!
Type your favourite city.

bijna 7 jaar ago

Solved


Energy of a photon
Given the frequency F of a photon in giga hertz. Find energy E of this photon in giga electron volts. Assume h, Planck's ...

bijna 7 jaar ago

Solved


How to subtract?
* Imagine you need to subtract a few numbers using MATLAB. * You will not be using eval for this task. * Given two ASCII strin...

bijna 7 jaar ago

Solved


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

bijna 7 jaar ago

Solved


Divisible by 4
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

ongeveer 7 jaar ago

Solved


Divisible by 3
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

ongeveer 7 jaar ago

Solved


Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

ongeveer 7 jaar ago

Solved


create a circulant matrix
create a circulant matrix

ongeveer 7 jaar ago

Solved


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

ongeveer 7 jaar ago

Solved


Are you in or are you out?
Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

ongeveer 7 jaar ago

Solved


Similar Triangles - find the height of the tree
Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Pleas...

ongeveer 7 jaar ago

Solved


does it touch ?
given a sentence, tell how much it touches. input : string output : how much it touches touching : a bilabial phoneme d...

ongeveer 7 jaar ago

Solved


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

ongeveer 7 jaar ago

Solved


Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

ongeveer 7 jaar ago

Solved


Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

ongeveer 7 jaar ago

Solved


Area of rhombus
Calculate the rhombus area

ongeveer 7 jaar ago

Solved


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

ongeveer 7 jaar ago

Solved


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

ongeveer 7 jaar ago

Solved


Determine the length of a string of characters
Determine the length of a string of characters

ongeveer 7 jaar ago

Solved


Polite numbers. N-th polite number.
A polite number is an integer that sums of at least two consecutive positive integers. For example _7 = 3+4_ so 7 is a polite...

ongeveer 7 jaar ago

Solved


Simple date to serial no. conversion
Convert a date string to a serial date number. For example if you take x='19-May-2001' then the result is 730990 x...

ongeveer 7 jaar ago

Load more