Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody.
Return a value equal to the number of input arguments to the fun...
約3年 前
解決済み
Radiation Heat Transfer — View Factors (1)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...
約3年 前
解決済み
Check if sorted
Check if sorted.
Example:
Input x = [1 2 0]
Output y is 0
約3年 前
解決済み
Summing digits
Given n, find the sum of the digits that make up 2^n.
Example:
Input n = 7
Output b = 11
since 2^7 = 128, and 1 + ...
約3年 前
解決済み
Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15
約3年 前
解決済み
Calculate area of sector
A=function(r,seta)
r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. http://en.wikipedia.org/wiki/Whole_numb...
Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...
約3年 前
解決済み
Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x.
<<https://i.imgur.com/jlZDHhq.png>>
Image courtesy of <http://up...
約3年 前
解決済み
Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x?
<<https://i.imgur.com/jlZDHhq.png>>
...
約3年 前
解決済み
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...
約3年 前
解決済み
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 right-...
約3年 前
解決済み
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...
約3年 前
解決済み
Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y?
<<https://imgur.com/x6hT6mm.png>>
...
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...
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...