{ "metadata": { "kernelspec": { "name": "python", "display_name": "Python (Pyodide)", "language": "python" }, "language_info": { "codemirror_mode": { "name": "python", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8" } }, "nbformat_minor": 5, "nbformat": 4, "cells": [ { "id": "0249ce39-58c8-4c14-88c8-1f6c16f60d0f", "cell_type": "markdown", "source": "
\n
🎅Christmas Coding Lesson🦌
\n
\n
\n

Work through each of the following activities in order to have a jolly holly lesson!

\n
\n\n
", "metadata": {} }, { "id": "df06476a-d59c-48fb-8395-0df50e9f06f8", "cell_type": "markdown", "source": "
\n
⌨️ Coding Activity (A): 12 Days of Christmas
\n
\n
\n

Follow this video guide in order to complete the 12 days of Christmas.

\n

This activity will see you edit a python list to include each of the 12 days.

\n

You will not need to modify the rest of the code.

\nClick for (Silent) video\n
\n\n
", "metadata": {} }, { "id": "d251f857-0a81-4671-9627-d79a8b953abb", "cell_type": "code", "source": "# Christmas A\n#----------------------\n# 12 Days of Christmas\n\n# Add to the list for the full 12 days!\ngifts=[\"Leave empty\",\n \"Two turtle doves🕊️🕊️\",\n \"Three French hens🐔🐔🐔\"]\n\n##################################################################\n# You don't need to edit the code below#\n##################################################################\nfor day in range(0,len(gifts),1):\n print(f\"On the {day + 1} day of Christmas my true love gave to me\")\n \n for each in range(day,0,-1): # Counting down\n print(f\"❄️{gifts[each]}\")\n \n if day > 0:\n print(\"and a partridge in a pair tree🐦\")\n else:\n print(\"A partridge in a pear tree🐦\")\n print(\"\")\n", "metadata": { "trusted": true }, "outputs": [], "execution_count": null }, { "id": "174ab9fa-77a4-4252-b3ad-2b77d2e66e28", "cell_type": "markdown", "source": "
\n
\n
\n
\n
\n
⌨️ Coding Activity (B): Oh Christmas Tree
\n
\n
\n

Follow this video guide in order to create a dazzling Christmas Tree

\n

This activity will see you work with For Loops, Ranges and Emojis

\n

We will build the code up as we go along

\nClick for (Silent) video\n
\n\n
", "metadata": {} }, { "id": "b60de619-1491-4c9a-a15b-295e6e10a021", "cell_type": "code", "source": "# Christmas B\n#----------------------\n# Make a Christmas Tree\n\n\n", "metadata": { "trusted": true }, "outputs": [], "execution_count": null }, { "id": "a160e419-ee15-4f5e-9b9d-c16f7f5eb1f4", "cell_type": "markdown", "source": "
\n
\n
\n
\n
\n
⌨️ Coding Activity (C): Advent Calendar
\n
\n
\n

Follow this video guide in order to create an outstanding Advent Calendar.

\n

The program will ask the user what day of December it is.

\n

It will then return an image

\n\n
\n\n
", "metadata": {} }, { "id": "13bad712-153a-4ce9-baf7-3e2b455b47b6", "cell_type": "code", "source": "# Christmas C\n#----------------------\n# Make An Advent Calendar\n\nfrom IPython.display import HTML, display\n\nday = 1\n\nimages = [\n \"https://tggcs.org/media_uploads/docs/christmas_python_pics/reindeer2.webp\",\n \"https://tggcs.org/media_uploads/docs/christmas_python_pics/elf.jpg\"\n]\n\n\n# Do not worry about changing this.\ndisplay(HTML(f\"\"\"\n

Merry Christmas

\n

{day} / 12 / 2025

\n\n\"\"\"))", "metadata": { "trusted": true, "scrolled": true }, "outputs": [ { "output_type": "display_data", "data": { "text/plain": "", "text/html": "\n

Merry Christmas

\n

2 / 12 / 2025

\n\n" }, "metadata": {} } ], "execution_count": 20 } ] }