How many trades represent all the profit?
Given a list of results from trades made:
[1 3 -4 2 -1 2 3]
We can add them up to see this series of trades made a profit ...
Triangle sequence
A sequence of triangles is constructed in the following way:
1) the first triangle is Pythagoras' 3-4-5 triangle
2) the s...
7 years ago
Solved
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
7 years ago
Solved
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...
Times 2 - START HERE
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Examples:...
7 years ago
Solved
Sums of cubes and squares of sums
Given the positive integers 1:n, can you:
1. Compute twice the sum of the cubes of those numbers.
2. Subtract the square...