3
$\begingroup$

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.

$\endgroup$
3
$\begingroup$

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}]

enter image description here

$\endgroup$
5
  • 1
    $\begingroup$ I like that! I'd still like to get the row and columns clearly indicated using cell boarders and their contents. $\endgroup$ – mikemtnbikes May 6 '20 at 0:09
  • 1
    $\begingroup$ @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? $\endgroup$ – Rohit Namjoshi May 6 '20 at 0:54
  • $\begingroup$ 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... ;) $\endgroup$ – kirma May 6 '20 at 7:27
  • 1
    $\begingroup$ @kirma I'd actually argue that seeing those patterns is pedagogically valuable. $\endgroup$ – mikemtnbikes May 6 '20 at 17:42
  • 1
    $\begingroup$ @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. $\endgroup$ – kirma May 6 '20 at 17:50
0
$\begingroup$

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 *)

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

renderingFunc[x_, y_] := If[
   (x == xmin || y == ymin),(*input values*) 
   headerItem[x + y],
   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}];
fullTable[[1, 1]] = headerItem["+"];

formattedTable = Grid[fullTable, 
  Frame -> All,
  ItemSize -> {itemSize, itemSize}, 
  BaseStyle -> {FontSize -> fontSize}]

Mod 3 Table

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.