# 練習問題答え
- 正解のプログラム例は下のとおり
import mcpi.minecraft as minecraft
mc = minecraft.Minecraft.create()
x, y, z = mc.player.getPos()
colors = [10, 2, 5, 8, 14, 0, 4, 11]
for i in range(8):
mc.setBlock(x, y + i, z + 1, 35, colors[i])
- 正解のプログラム例は下のとおり
import mcpi.minecraft as minecraft
mc = minecraft.Minecraft.create()
x, y, z = mc.player.getPos()
colors = [10, 2, 5, 8, 14, 0, 4, 11]
for i in range(8):
mc.setBlocks(x + i, y + i, z + 1, x + i, y + i, z + 3, 35, colors[i])