Solved

PACMAT - Ghosts Random; 3 Lives

The Classic PACMAN game brought to Cody. PACMAT Ghosts Random requires clearing the board of Yellow Dots while not bumping in...

8 mois ago

Solved

Calculate Resistance 2

In this problem, you have to calculate Resistance R of a linear conductor having voltage V across it and current I is passing i...

8 mois ago

Solved

Calculate Resistance

Calculate Resistance R of a linear conductor having resistivity p, length l and area A

8 mois ago

Solved

Add 3 numbers

In this problem, you have to add three numbers a, b and c. Give output d = add(a,b,c)

8 mois ago

Solved

Ratio between sum of primer numbers and non-prime numbers

Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

8 mois ago

Solved

PACMAT Easy

The Classic PACMAN game brought to Cody. PACMAT_Easy is the simple case of clearing the board of Yellow Dots while not bumpin...

8 mois ago

Solved

Pair Primes

Let's define pair primes as follow; * *For 2 digits numbers:* 11 and 17 are pair primes because both of them are 2 digits pri...

9 mois ago

Solved

Lights Out 3 - 5x5, 6 moves

<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

9 mois ago

Solved

Lights Out 1 - 5x5, 3 moves

<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

9 mois ago

Solved

Lights Out 2 - 5x5, 4 moves

<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

9 mois ago

Solved

Word Distance - Sum

Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...

9 mois ago

Solved

Get the value 100

Knowing that 123-45-67+89=100, write a function that gives this result for any order of the digits in the input. Otherwise, the ...

9 mois ago

Solved

Get the mean digit

Write a function that gives the mean digit (round towards nearest integer) of an input and positive number. For example: x ...

9 mois ago

Solved

One track five lanes

Find the minimum number of lane changes necessary to cross the entire track without running into any obstacles <<http://www.a...

9 mois ago

Solved

Scalar Matrix Manipulation

Assume, input x is a scalar matrix such as, x = 2 0 0 0 2 0 0 0 2 th...

9 mois ago

Solved

Find the complement of a number in binary

Input x is a decimal number and output y is the complement of binary representation of x. For example, x = 10 has the binary ...

9 mois ago

Solved

Calculate the square of a number (Super Easy)

The goal is to calculate the square (y) of a number (x). Good way to start MatLab for beginners.

9 mois ago

Solved

Just another sum (JAS)

*Task:* Write a function that takes a vector X and returns the alternating sum of X: X(1)-X(2)+X(3)-X(4)+... *Example...

9 mois ago

Solved

Give the Shortest Path Through The Maze

*Description* The purpose of this problem is to give the shortest path through a maze. The maze will be provided in a codifie...

9 mois ago

Solved

The sliding puzzle: 3D

This is an extension of <https://www.mathworks.com/matlabcentral/cody/problems/42842 problem 42842>. In this case, the puzzle is...

9 mois ago

Solved

Mean number of letters per word (Easy)

Given a character array, s, representing a sentence, return a, the arithmetic mean of the number of letters per word in the give...

9 mois ago

Solved

The sliding puzzle: 15

If you are unfamiliar with the sliding puzzle, enter the command _fifteen_ in your MATLAB command window (or search online, of c...

9 mois ago

Solved

Can we make a triangle?

Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

9 mois ago

Solved

Find the next Fibonacci number

In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...

9 mois ago

Solved

Iccanobif numbers 1

There are a lot of problems in Cody that deal with Fibonacci numbers (1, 1, 2, 3, 5, 8, 13, 21 etc...) so let's turn things arou...

9 mois ago

Solved

Double the next!

Given two numbers, m and n, find a matrix m x n where each element value is twice the value of the previous element. Starting fr...

9 mois ago

Solved

currency converter

given a rate of exchange calculate the equivalent units of 100 USD

11 mois ago

Solved

what's my tax amount this year ?

given an annual salary x and a tax rate i calculate the amount that you have to pay.Example x = 70000; i=.10 y_correc...

11 mois ago

Solved

Tax Calculator

Calculate the tax for a given income. 10% tax is paid for any income up to $2,000. 20% tax is paid for additional income u...

11 mois ago