{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "746a9c8f-9e21-42ee-88da-34b5e2730340",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-03T21:37:20.837833Z",
     "iopub.status.busy": "2025-11-03T21:37:20.837467Z",
     "iopub.status.idle": "2025-11-03T21:37:20.842042Z",
     "shell.execute_reply": "2025-11-03T21:37:20.841130Z",
     "shell.execute_reply.started": "2025-11-03T21:37:20.837803Z"
    }
   },
   "outputs": [],
   "source": [
    "# Beispiel Daten:\n",
    "#   Liste von Tupeln, jedes Tupel:  (steuernr, normalHunde, kampfHunde)\n",
    "hundehalter = [\n",
    "    (1234, 3, 5),\n",
    "    (1235, 4, 0),\n",
    "    (1236, 1, 0)\n",
    "]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6850a526-99d2-48f1-8bed-81756b49104f",
   "metadata": {},
   "source": [
    "# Aufgabe \"Hundesteuer\"\n",
    "<div style=\"font-size: 16px;\">\n",
    "\n",
    "    \n",
    "Sie arbeiten beim Steueramt der Stadt Bochum und sollen ein Programm schreiben, mit dem die Hundesteuer berechnet werden kann.\n",
    "\n",
    "Bei der Berechnung der Steuern wird zwischen Normalhunden und Kampfhunden unterschieden.\n",
    "Für Normalhunde wird ein Staffelsteuersatz verwendet:\n",
    "  - Bei einem Hund im Haushalt kostet der Hund 120 € pro Jahr\n",
    "  - Bei zwei oder drei Hunden im Haushalt kostet jeder Hund 150 € pro Jahr\n",
    "  - Bei vier und mehr Hunden im Haushalt kostet jeder Hund 180 € pro Jahr\n",
    "\n",
    "Kampfhunde werden grundsätzlich ebenfalls wie Normalhunde behandelt (das heißt die Anzahl von Kampfhunden und Normalhunden wird addiert und danach nach obiger Staffelung der Steuersatz berechnet), es gilt jedoch folgende Sonderregelung:\n",
    "  -  Übersteigt die Anzahl der Kampfhunde die Anzahle der Normalhunde, so wird der zu\n",
    "entrichtende Steuersatz verdoppelt.\n",
    "</div>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "b44bc6f7-b143-403e-beb5-bf5f00af9e68",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-04T08:28:50.947331Z",
     "iopub.status.busy": "2025-11-04T08:28:50.946974Z",
     "iopub.status.idle": "2025-11-04T08:28:50.951779Z",
     "shell.execute_reply": "2025-11-04T08:28:50.950894Z",
     "shell.execute_reply.started": "2025-11-04T08:28:50.947301Z"
    }
   },
   "outputs": [],
   "source": [
    "def berechne_steuersatz(anzahlHunde):\n",
    "    if anzahlHunde == 1:\n",
    "        return 120\n",
    "    elif anzahlHunde <= 3:\n",
    "        return 150\n",
    "    else:\n",
    "        return 180\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "9e21e183-4de1-4b23-a6be-a457f04422ad",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-04T08:29:52.112655Z",
     "iopub.status.busy": "2025-11-04T08:29:52.112344Z",
     "iopub.status.idle": "2025-11-04T08:29:52.118015Z",
     "shell.execute_reply": "2025-11-04T08:29:52.117323Z",
     "shell.execute_reply.started": "2025-11-04T08:29:52.112628Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "150"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "berechne_steuersatz(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "2d9ae1ae-dc3f-4500-a130-225a5bdc0558",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-04T08:33:07.801682Z",
     "iopub.status.busy": "2025-11-04T08:33:07.801318Z",
     "iopub.status.idle": "2025-11-04T08:33:07.806120Z",
     "shell.execute_reply": "2025-11-04T08:33:07.805224Z",
     "shell.execute_reply.started": "2025-11-04T08:33:07.801653Z"
    }
   },
   "outputs": [],
   "source": [
    "def hundesteuer(normal, kampf):\n",
    "    anzahl = normal + kampf\n",
    "    steuersatz = berechne_steuersatz(anzahl)\n",
    "\n",
    "    if kampf > normal:\n",
    "        return anzahl * steuersatz * 2\n",
    "    \n",
    "    return anzahl * steuersatz"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "f599eb5e-7a2f-433e-9664-91cad64de9e8",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-04T08:33:35.227111Z",
     "iopub.status.busy": "2025-11-04T08:33:35.226753Z",
     "iopub.status.idle": "2025-11-04T08:33:35.231224Z",
     "shell.execute_reply": "2025-11-04T08:33:35.230271Z",
     "shell.execute_reply.started": "2025-11-04T08:33:35.227081Z"
    }
   },
   "outputs": [],
   "source": [
    "def berechne_faktor(norm, kampf):\n",
    "    if kampf > norm:\n",
    "        return 2\n",
    "    else:\n",
    "        return 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e6c36233-4d9b-4dd6-8513-8efd70324be5",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c652fb5e-a8e5-4d8d-aa17-c1b6497d0607",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "fd91b62e-a8b9-4707-953d-6dd6f3c367a3",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-11-04T08:59:48.309814Z",
     "iopub.status.busy": "2025-11-04T08:59:48.309467Z",
     "iopub.status.idle": "2025-11-04T08:59:48.314145Z",
     "shell.execute_reply": "2025-11-04T08:59:48.313249Z",
     "shell.execute_reply.started": "2025-11-04T08:59:48.309785Z"
    }
   },
   "outputs": [],
   "source": [
    "def hundesteuer_alternativ(normal, kampf):\n",
    "    anzahl = normal + kampf\n",
    "    steuersatz = berechne_steuersatz(anzahl)\n",
    "    faktor = berechne_faktor(normal, kampf)\n",
    "        \n",
    "    return anzahl * steuersatz * faktor"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7327ad87-501b-474a-b88b-952f6d2f314d",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "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.12.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
