{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Problem 1\n", "\n", "Build a BlockGrid of size 10x10, and then combine 'for' and 'if' loops to make three lists:\n", "\n", "one list, 'bottom', containing the 10 cells of the last row;\n", "one list, 'right', containing the 10 cells of the last column;\n", "one list, 'even_diagonal', containing the 5 cells down the diagonal spaced one apart." ] }, { "cell_type": "code", "collapsed": false, "input": [ "from ipythonblocks import BlockGrid\n", "grid = BlockGrid(10, 10, fill=(123, 234, 123))\n", "grid" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "