diff --git a/programming_exercise.ipynb b/programming_exercise.ipynb index 8422efd..89d94db 100644 --- a/programming_exercise.ipynb +++ b/programming_exercise.ipynb @@ -1,49 +1,79 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Jupyter Notebook demo\n", + "\n", + "Estimated workload for a standard MOOC, based on the number of weeks envisaged. \n", + "\n", + "**Instructions:**\n", + "\n", + "- Click on the code cell and press the play button (top menu)\n", + "- Choose the number of weeks in the below dropdown menu " + ] + }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "5\n" - ] + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "b258ef4693094d61ad81d42020ee3048", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "interactive(children=(Dropdown(description='Weeks', options=(3, 4, 5, 6), value=3), Output()), _dom_classes=('…" + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ - "print(2+3)" + "from ipywidgets import interact\n", + "from IPython.core.display import display, HTML\n", + "\n", + "def workload(Weeks):\n", + " videos = Weeks*8 \n", + " practice_quizzes = Weeks*8*5\n", + " graded_quizzes = Weeks*10 \n", + " display(HTML(\"

Work load:

We strongly recommand to replace groups of quiz questions by hands-on exercises.

\".format(videos, practice_quizzes, graded_quizzes)))\n", + " \n", + "result = interact(workload, Weeks=[3, 4, 5, 6])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.9" } }, "nbformat": 4, "nbformat_minor": 4 }