Solved


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

1 month ago

Solved


Test if a number is numeric or not
Test if a number is numeric or not

1 month ago

Solved


An n-sided regular polygon is drawn within a circle whose radius is 'r', what will be the area of the polygon?
area of a polygon is p*a/2. where, p is the perimeter and a is the apothem i.e. the normal distance from center to any of the si...

1 month ago

Solved


Min-Max digit

1 month ago

Solved


Leader
An element of a list is called a "leader" if every element to its right (and not just the one immediately to its right) is stric...

1 month ago

Solved


A row vector, pick 1st number, skip 1,pick 3rd number, skip 2,pick,skip,etc then place all picked numbers in order in new vector
Having a row vector of number, pick the first number, place in new output vector as the first value, then skip one number, pick...

1 month ago

Solved


Average Grade
Given a 1x5 vector presents the grades of a student on five tests. Calculate the average grade of that student.

1 month ago

Solved


Sum of a geometric series
Give the sum of the first 'n' terms of a geometric series, given 'a' as the first term and 'r' as the ratio.

1 month ago

Solved


Is It a Palindrome?
Given a string or array, determine if it is a palindrome.

1 month ago

Solved


Determina el número de cifras de un número
Crea una función que te devuelva el número de cifras de un número. Algunos ejemplos para ayudarte serían: El número 125 tie...

1 month ago

Solved


find the 'M'
for an input x, return 1 at the location of the letter 'M'

1 month ago

Solved


Reverse Integer
You are given an integer, reverse its digits. For negative integers, the sign should remain in the front. For instance, 12340 s...

1 month ago

Solved


Vector Magnitude Calculator
'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

1 month ago

Solved


Ordinary Annuity : Periodic Payments (Future Value)
Theorem : Future Value of an Ordinary Annuity where; F : Future value A : Periodic payment r : Rate per period n : Numbe...

1 month ago

Solved


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

1 month ago

Solved


Find duplicate number from a vector of size n + 1 containing numbers from 1:n
From a given vector of size n + 1, return the duplicate number. Constraints The vector can only contain numbers from 1 to ...

1 month ago

Solved


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

1 month ago

Solved


Lancer de dés
Ecrire une fonction qui imite le lancer d'un dé, i-e qui renvoie de façon aléatoire un entier entre 1 et 6. Attention cette fon...

1 month ago

Solved


Ordinary Annuity : Present Value
Theorem : Present Value of an Ordinary Annuity where; P : Present value of all payments A : Periodic payment r : Interest ...

1 month ago

Solved


Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

1 month ago

Solved


Find cross product of 2 vectors
Find cross product of 2 vectors

1 month ago

Solved


Rotate a matrix for 180 degree
Rotate a matrix for 180 degree for eg: x=[1 2 3 4] y=[4 3 2 1]

1 month ago

Solved


Sum all integers from 1 to 2^x
Given a number x, your function must return the summation of all integers from 1 to 2^x.

1 month ago

Solved


pressure to dB?
given x ratio of pressure, find corresponding y dB

1 month ago

Solved


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

1 month ago

Solved


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

1 month ago

Solved


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

1 month ago

Solved


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

1 month ago

Solved


Put Two 1D matrices into one 1D matrix
Example: If input a = [1 2 3 4 5]; input b = [10 9 8 7 6]; then output will be, y_correct = [1 10 2 9 3 8 4 7 5...

1 month ago

Load more