{ "metadata": { "name": "SWCDemo" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Initial cell has buttons to show/hide all hint cells" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", " " ] }, { "cell_type": "code", "collapsed": false, "input": [ "# this code cell isn't marked, so it survives\n", "print \"Welcome to Software Carpentry!\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Welcome to Software Carpentry!\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Problem 1" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Click this button to reveal a hint: " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## This is Hint # 1\n", "\n", "We mark each hint cell with an empty div:\n", "\n", "
\n", "\n", "" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Solution goes here" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 }, { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Problem 2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Click this button to reveal the next hint: " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### This is Hint #2\n", "\n", "Here is how we are toggling hints:\n", "\n", " \n", "\n", "" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Solution goes here" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 3 }, { "cell_type": "markdown", "metadata": {}, "source": [ "*footer that hides all hints on load*\n", "\n", "Alternatively, one could add individual hides inside each hint cell,\n", "but this is the simplest way to hide all of them on page load.\n", "\n", "" ] } ], "metadata": {} } ] }