I'm working with my 6 year old on understanding and mastering addition. As a result, I want to be able to make some custom addition (and eventually multiplication) tables for her to fill out.

Specifically, I'd like to be able to black out some cells, such as every other one in a row or all odd numbers, and then leave the remaining ones blank for her to fill out. The goal is for her to see the patterns embedded within the table. I am, however, finding it difficult to do and I'd appreciate some input.

1) What's the best way to make a table? I've messed around with the Grid[] function, but have issues. For example, I can't get the column and row values enclosed in heavy grid lines while the rest are in light grid lines.

Here's my code:

xmin = 0;
xmax = 10;
ymin = xmin;
ymax = xmax;
fontSize = 18;

xFrameStyle =
Join[{1 -> Thickness[5]},
Table[i -> Thin, {i, xmin + 2, xmax + 1}]] // Reverse;

tableInterior = Table[x + y, {x, xmin, xmax}, {y, ymin, ymax}];
tableInterior[[1, 1]] = "+";
fullTable = Grid[tableInterior,
Frame -> {xFrameStyle, xFrameStyle},
BaseStyle -> {FontSize -> fontSize}]


I'm wondering, would using Table and TableHeading be wiser. Some other function?

2) What's a good way of putting black boxes in individual cells? I can see how I could use a Replace or Map function to replace all even or odd numbers with, say, a black box, but that generally wouldn't take up the entire cell.

Much obliged.

How about randomly blanking out cells to be filled in.

hideCells = 30; (* Number of cells to blank out *)

tableInterior = Table[x + y, {x, xmin, xmax}, {y, ymin, ymax}] //
ReplacePart[RandomInteger[{2, xmax + 1}, {hideCells, 2}] -> ""]

tableInterior[[1, 1]] = "+";

fullTable = Grid[tableInterior,
Frame -> {xFrameStyle, xFrameStyle},
BaseStyle -> {FontSize -> fontSize}]


• I like that! I'd still like to get the row and columns clearly indicated using cell boarders and their contents. – mikemtnbikes May 6 '20 at 0:09
• @mikemtnbikes I am not sure exactly what you mean. Perhaps you could take the image I posted and draw what you are looking for on it, and add to your question? – Rohit Namjoshi May 6 '20 at 0:54
• A non-technical comment: a densely filled addition table is not necessarily pedagogically useful the way one hopes when offspring notices that diagonals lave the same value... ;) – kirma May 6 '20 at 7:27
• @kirma I'd actually argue that seeing those patterns is pedagogically valuable. – mikemtnbikes May 6 '20 at 17:42
• @mikemtnbikes It is, but only to an extent. Once it has been seen, clever individuals will just fill the diagonals. It is not much help on remembering how much 5+7 is, because geometric interpretation on paper is much easier than doing the same on your head. – kirma May 6 '20 at 17:50

Thanks for your input Rohit, it got me thinking.

As a result, here's what I've come up with

(*formatting values *)
fontSize = 20;
frameThickness = 5;
itemSize = 1.5;

(* Value Ranges *)
xmin = 0;
xmax = 10;
ymin = xmin;
ymax = xmax;

(* Functions *)
(* Determine which cells for student to fill in *)

testFunc[x_, y_] := Mod[(x + y), 3] == 0

(* Define style for input row and column *)

Item[ Style[z, Bold], FrameStyle -> Thickness[frameThickness]]

renderingFunc[x_, y_] := If[
(x == xmin || y == ymin),(*input values*)
If[
testFunc[x, y],
Item[""],
Item["", Background -> Black]
]
];

(*determine which cells for student to fill in*)
(*set up table*)

fullTable = Table[
renderingFunc[x, y], {x, xmin, xmax}, {y, ymin, ymax}];