Risolto


Return fibonacci sequence do not use loop and condition
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

circa 2 anni fa

Risolto


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

circa 2 anni fa

Risolto


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

circa 2 anni fa

Risolto


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

circa 2 anni fa

Risolto


Solve a System of Linear Equations
Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...

circa 2 anni fa

Risolto


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

circa 2 anni fa

Risolto


Sum of series
a(n) = n^2 - (n-1)^2 find the summation of the series upto n i.e. a(1)+a(2)+...+a(n)

circa 2 anni fa

Risolto


Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

circa 2 anni fa

Risolto


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

circa 2 anni fa

Risolto


Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

circa 2 anni fa

Risolto


Sum of series IX

circa 2 anni fa

Risolto


Sum of series VIII

circa 2 anni fa

Risolto


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

circa 2 anni fa

Risolto


Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

circa 2 anni fa

Risolto


Sum of series IV
What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?

circa 2 anni fa

Risolto


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

circa 2 anni fa

Risolto


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

circa 2 anni fa

Risolto


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

circa 2 anni fa

Risolto


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

circa 2 anni fa

Risolto


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

circa 2 anni fa

Risolto


Create a vector
Create a vector from 0 to n by intervals of 2.

circa 2 anni fa

Risolto


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

circa 2 anni fa

Risolto


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

circa 2 anni fa

Risolto


Find max
Find the maximum value of a given vector or matrix.

circa 2 anni fa

Risolto


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

circa 2 anni fa

Risolto


Inner product of two vectors
Find the inner product of two vectors.

circa 2 anni fa

Risolto


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

circa 2 anni fa

Risolto


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

circa 2 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. <<https://imgur...

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

circa 2 anni fa

Carica altro