There is a "multiplication table", isn't it? This is the one when children learn multiplication in Japan.
"Inichi gaichi, innigani, insan gasan," is the one.
The multiplication table is convenient for learning multiplication, but I heard the opinion that "You can't just remember the pun. You have to understand the meaning of multiplication." So I made a poster that can understand the meaning of multiplication as well. I made it with matplotlib. It took about 30 minutes to code.
!pip install japanize-matplotlib
Collecting japanize-matplotlib
[?25l Downloading https://files.pythonhosted.org/packages/aa/85/08a4b7fe8987582d99d9bb7ad0ff1ec75439359a7f9690a0dbf2dbf98b15/japanize-matplotlib-1.1.3.tar.gz (4.1MB)
[K |████████████████████████████████| 4.1MB 5.5MB/s
[?25hRequirement already satisfied: matplotlib in /usr/local/lib/python3.6/dist-packages (from japanize-matplotlib) (3.2.2)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->japanize-matplotlib) (1.3.1)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->japanize-matplotlib) (2.8.1)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.6/dist-packages (from matplotlib->japanize-matplotlib) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->japanize-matplotlib) (2.4.7)
Requirement already satisfied: numpy>=1.11 in /usr/local/lib/python3.6/dist-packages (from matplotlib->japanize-matplotlib) (1.19.5)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.6/dist-packages (from python-dateutil>=2.1->matplotlib->japanize-matplotlib) (1.15.0)
Building wheels for collected packages: japanize-matplotlib
Building wheel for japanize-matplotlib (setup.py) ... [?25l[?25hdone
Created wheel for japanize-matplotlib: filename=japanize_matplotlib-1.1.3-cp36-none-any.whl size=4120276 sha256=642a1577ef5e695d7ef7a5fc14e07ad45d62ab853ca64da221873f69938f3e6c
Stored in directory: /root/.cache/pip/wheels/b7/d9/a2/f907d50b32a2d2008ce5d691d30fb6569c2c93eefcfde55202
Successfully built japanize-matplotlib
Installing collected packages: japanize-matplotlib
Successfully installed japanize-matplotlib-1.1.3
import matplotlib.pyplot as plt
import japanize_matplotlib
fig, axes = plt.subplots(nrows=9, ncols=9, figsize=(16, 16))
for x in range(9):
for y in range(9):
axes[y][x].axis("off")
axes[y][x].set_aspect("equal")
axes[y][x].set_title("{} x {} = {}".format(x + 1, y + 1, (x + 1) * (y + 1)))
axes[y][x].set_xlim([0, 11])
axes[y][x].set_ylim([0, 11])
X = []
Y = []
for i in range(x + 1):
for j in range(y + 1):
X.append(i + 2)
Y.append(10 - j - 1)
axes[y][x].scatter(X, Y)
plt.savefig("300_dpi_scatter.png ", format="png", dpi=300)
By the way, it seems that teachers who care about the order of multiplication are talking about on Twitter etc., but is there anything to say about this?
My kids love the mice, so I made a mouse version as well.
fig, axes = plt.subplots(nrows=9, ncols=9, figsize=(28, 28))
for x in range(9):
for y in range(9):
axes[y][x].axis("off")
axes[y][x].set_aspect("equal")
axes[y][x].set_title("{} x {} = {}".format(x + 1, y + 1, (x + 1) * (y + 1)), fontsize=20)
axes[y][x].set_xlim([-1, 11])
axes[y][x].set_ylim([-1, 11])
X = []
Y = []
for i in range(x + 1):
for j in range(y + 1):
X.append(i + 2)
Y.append(10 - j - 1)
if (x + 1) * (y + 1) % 2 == 1:
c = 'k'
else:
c = 'r'
axes[y][x].scatter(X, Y, c=c, s=28, marker='o')
axes[y][x].scatter([xx + 0.25 for xx in X], [yy + 0.25 for yy in Y], c=c, s=12, marker='o')
axes[y][x].scatter([xx - 0.25 for xx in X], [yy + 0.25 for yy in Y], c=c, s=12, marker='o')
plt.savefig("300_dpi_scatter.png ", format="png", dpi=300)
If the result of the multiplication is odd, I made it black, and if it was even, I made it red. Haha ♪
Recommended Posts