Period of a pendulum
Consider a small object hanging on a massless thread and pulled back from equilibrium at a small angle. Assuming that the pivot ...
Harmonic series counting
The function takes a positive limit as input,
And counts how many terms must be summed in the harmonic series:
1/1, 1/2, 1/3, ...
2 years 前
已解决
Intersection points of a polynomial
Find the intersection points of a polynomial, given by its vector of coefficients with the X-axis and the Y-axis.
Input: a poly...
Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...
2 years 前
已解决
Box
Give the volume of a box, x is equal to the body diagonal.
2 years 前
已解决
Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...
2 years 前
已解决
Calories in a slice of pizza?
The total calories C in a pizza is printed on its box. You know the angle A (degrees) of the slice you placed on your plate. Ple...