Risolto

Given a window, how many subsets of a vector sum positive

Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

oltre 6 anni fa

Risolto

Implement simple rotation cypher

If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

oltre 6 anni fa

Risolto

Is this triangle right-angled?

Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

oltre 6 anni fa

Risolto

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

oltre 6 anni fa

Risolto

Side of an equilateral triangle

If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

oltre 6 anni fa

Risolto

Area of an Isoceles Triangle

An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<http://upload...

oltre 6 anni fa

Risolto

Area of an equilateral triangle

Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

oltre 6 anni fa

Risolto

Length of the hypotenuse

Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

oltre 6 anni fa

Risolto

Is this triangle right-angled?

Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

oltre 6 anni fa

Risolto

Length of a short side

Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

oltre 6 anni fa

Risolto

5 Prime Numbers

Your function will be given lower and upper integer bounds. Your task is to return a vector containing the first five prime numb...

oltre 6 anni fa

Risolto

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

oltre 6 anni fa

Risolto

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

oltre 6 anni fa

Risolto

Basic electricity in a dry situation

⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ &#...

oltre 6 anni fa

Risolto

Pentagonal Numbers

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

oltre 6 anni fa

Risolto

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

oltre 6 anni fa

Risolto

Energy of a photon

*⚛ ☢ ⚛ ☢ ⚛ ☢ ⚛* Given the frequency F of a photon in giga hertz. Find energy E of this...

oltre 6 anni fa

Risolto

Acid and water

⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ Assume that there is a 100 liter tank. It is initially fi...

oltre 6 anni fa

Risolto

Sums of Distinct Powers

You will be given three numbers: base, nstart, and nend. Write a MATLAB script that will compute the sum of a sequence of both ...

oltre 6 anni fa

Risolto

An asteroid and a spacecraft

🚀 Imagine a non-relativistic simple situation. Assume positions p0, p1, p2, and p3 are three dimensional Cartesian ...

oltre 6 anni fa

Risolto

"Cody" * 5 == "CodyCodyCodyCodyCody"

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

oltre 6 anni fa

Risolto

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

oltre 6 anni fa

Risolto

How to subtract?

*± ± ± ± ± ± ± ± ± ± ±* * Imagine you need to subtract one...

oltre 6 anni fa