Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input vector of numbers, output a square array with the...
約11年 前
解決済み
Roll the Dice!
*Description*
Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice.
*Example*
[x1,x2] =...
約11年 前
解決済み
Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next.
Example input:
x = [10 2];
Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x.
For instance if x=2 then y must be 1+2+3+4=10.
約11年 前
解決済み
Weighted average
Given two lists of numbers, determine the weighted average.
Example
[1 2 3] and [10 15 20]
should result in
33.333...
約11年 前
解決済み
Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.]
Non-scor...