{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "# Student Assignment (Partial Incorrect Solutions)\n",
        "This file intentionally contains incorrect or incomplete implementations to test your evaluator."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "bcd1dfbc",
      "metadata": {},
      "outputs": [],
      "source": [
        "name = \"perfect but zero\"\n",
        "roll_number = \"000 7 0000\""
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## question_one (Incorrect Example)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": [
        "def question_one(nums: list[int]) -> int:\n",
        "    return sum(nums)  # incorrect: should sum unique values"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## question_two (Incorrect Example)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": [
        "def question_two(xs: list) -> list:\n",
        "    return xs  # incorrect: does not reverse"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## question_three (Incorrect Example)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": [
        "def question_three(xs: list) -> dict:\n",
        "    return {}  # incorrect: no counting"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## question_four (Incorrect Example)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": [
        "def question_four(nested: list[list]) -> list:\n",
        "    return nested  # incorrect: not flattened"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## question_five (Incorrect Example)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": [
        "def question_five(d: dict) -> dict:\n",
        "    inv = {}\n",
        "    for k, v in d.items():\n",
        "        inv.setdefault(v, []).append(k)\n",
        "    return inv"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 5
}
