Rules
No cell range references (
A2:B3
).Maximum 9 rows and 9 columns.
No circular references or formula errors.
Empty cells evaluate to
0
.Data are numbers only, but may be taken as strings.
Formulas are strings.
Implementation choices
You must state your choices in these matters:
Require formulas to be prefixed with any single character, e.g.
=
– or not.The leftmost cell of the second row is
A2
orR2C1
, as per the two conventions used by Excel et al.Require any single-character pre- or suffix in cell references, e.g.
$
– or not.One of null, empty string, empty list, etc., (but not
0
) to represent empty cells.Language of your submission (spreadsheet managers are not allowed).
Language for the formulas (may differ from the above).*
Brownie points or cookies for explaining your solution.
Examples
Choices: 7: =
; 8: A2
; 9: none; 10: ""
; 12: Excel Formula Language
In:
[[ 2, 3],
["=A1+B1",""]]
Out:
[[2,3],
[5,0]]
In:
[[ 2,"=A1+B2"],
["=A1+B1", ""]]
Out:
[[2,2],
[4,0]]
In:
[[ 3, 4,"=A1*B1"],
[ 2, 5,"=A2*B2"],
["","","=C1+C2"]]
Out:
[[3,4,12],
[2,5,10],
[0,0,22]]
In:
[["","=2*B2*B3" ,""],
[ 3,"=A1+(A2+C2)/2", 2],
[ 1,"=C1+(A3+C3)/2", 5]]
Out:
[[0,15, 0],
[3, 2.5,2],
[1, 3 ,5]]
* The formula language must be PPCG admissible, but you only have to support cell references plus criteria 3 and 4 there, wiz. addition and primeness determination.
Expand array to cells, evaluate.
\$\endgroup\$R0C0
? \$\endgroup\$