{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "9bcdd5d4-58de-46c8-98cd-8451145d1143",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-05-06T12:30:51.527523Z",
     "iopub.status.busy": "2026-05-06T12:30:51.527208Z",
     "iopub.status.idle": "2026-05-06T12:30:51.532841Z",
     "shell.execute_reply": "2026-05-06T12:30:51.531802Z",
     "shell.execute_reply.started": "2026-05-06T12:30:51.527487Z"
    }
   },
   "outputs": [],
   "source": [
    "def g(xs):\n",
    "    s1 = 0\n",
    "    s2 = 0\n",
    "\n",
    "    for zahl in xs:\n",
    "        if zahl % 2 == 0:\n",
    "            s1 = s1 + zahl\n",
    "        else:\n",
    "            s2 = s2 + zahl\n",
    "\n",
    "    return (s1, s2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "3d0cb662-35d5-4b16-9288-eec0f5ca38b7",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-05-06T12:31:02.338259Z",
     "iopub.status.busy": "2026-05-06T12:31:02.337942Z",
     "iopub.status.idle": "2026-05-06T12:31:02.342744Z",
     "shell.execute_reply": "2026-05-06T12:31:02.341462Z",
     "shell.execute_reply.started": "2026-05-06T12:31:02.338225Z"
    }
   },
   "outputs": [],
   "source": [
    "zahlen = [1,2,3,4,5,6,7,8,9]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "24049ea0-7e38-44ff-9fba-b79230f4f225",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-05-06T12:31:45.733226Z",
     "iopub.status.busy": "2026-05-06T12:31:45.662581Z",
     "iopub.status.idle": "2026-05-06T12:36:21.202716Z",
     "shell.execute_reply": "2026-05-06T12:36:21.196878Z",
     "shell.execute_reply.started": "2026-05-06T12:31:45.727459Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(20, 25)"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g(zahlen)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "270dee56-84bf-4e4a-aa2f-9148e962a943",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-05-06T13:01:33.153301Z",
     "iopub.status.busy": "2026-05-06T13:01:33.152627Z",
     "iopub.status.idle": "2026-05-06T13:01:33.159447Z",
     "shell.execute_reply": "2026-05-06T13:01:33.158002Z",
     "shell.execute_reply.started": "2026-05-06T13:01:33.153182Z"
    }
   },
   "outputs": [],
   "source": [
    "def berechne_steuersatz(anzahlHunde):\n",
    "    if anzahlHunde == 1:\n",
    "        return 120\n",
    "    elif anzahlHunde <= 3: #  and anzahlHunde <= 3:\n",
    "        return 150\n",
    "    else:\n",
    "        return 180"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "986b6b4e-d6b8-4195-aadd-5a6ef38db002",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-05-06T12:50:49.887119Z",
     "iopub.status.busy": "2026-05-06T12:50:49.886445Z",
     "iopub.status.idle": "2026-05-06T12:50:49.895714Z",
     "shell.execute_reply": "2026-05-06T12:50:49.894077Z",
     "shell.execute_reply.started": "2026-05-06T12:50:49.887000Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "120"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "berechne_steuersatz(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "84d1ef18-71b2-4881-a253-f42d01b8c574",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-05-06T12:53:17.324243Z",
     "iopub.status.busy": "2026-05-06T12:53:17.323580Z",
     "iopub.status.idle": "2026-05-06T12:53:17.332776Z",
     "shell.execute_reply": "2026-05-06T12:53:17.331251Z",
     "shell.execute_reply.started": "2026-05-06T12:53:17.324126Z"
    }
   },
   "outputs": [],
   "source": [
    "def faktor(anzahlNormal, anzahlKampf):\n",
    "    if anzahlNormal < anzahlKampf:\n",
    "        return 2\n",
    "    else:\n",
    "        return 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "8d25e20a-ae32-42f7-89fa-82133f13e4c2",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-05-06T12:53:39.685687Z",
     "iopub.status.busy": "2026-05-06T12:53:39.685019Z",
     "iopub.status.idle": "2026-05-06T12:53:39.696878Z",
     "shell.execute_reply": "2026-05-06T12:53:39.695177Z",
     "shell.execute_reply.started": "2026-05-06T12:53:39.685570Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "faktor(3, 6)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "28a9635a-4f7f-434f-8caa-205accf87dd4",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-05-06T12:57:28.063144Z",
     "iopub.status.busy": "2026-05-06T12:57:28.062457Z",
     "iopub.status.idle": "2026-05-06T12:57:28.072333Z",
     "shell.execute_reply": "2026-05-06T12:57:28.070437Z",
     "shell.execute_reply.started": "2026-05-06T12:57:28.063027Z"
    }
   },
   "outputs": [],
   "source": [
    "def berechne_hundesteuer(anzahlNormal, anzahlKampf):\n",
    "\n",
    "    gesamtanzahl = anzahlNormal + anzahlKampf\n",
    "    steuersatz = berechne_steuersatz(gesamtanzahl)\n",
    "    kampf_faktor = faktor(anzahlNormal, anzahlKampf)\n",
    "\n",
    "    return gesamtanzahl * steuersatz * kampf_faktor"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "7f8be6b2-dc5a-4039-ba39-20a807e08b94",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-05-06T12:57:37.811771Z",
     "iopub.status.busy": "2026-05-06T12:57:37.811102Z",
     "iopub.status.idle": "2026-05-06T12:57:37.825150Z",
     "shell.execute_reply": "2026-05-06T12:57:37.823757Z",
     "shell.execute_reply.started": "2026-05-06T12:57:37.811653Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2880"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "berechne_hundesteuer(3, 5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "fdc8ce8e-b59d-417a-ac3a-6074184b271a",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-05-06T13:07:06.181082Z",
     "iopub.status.busy": "2026-05-06T13:07:06.180419Z",
     "iopub.status.idle": "2026-05-06T13:07:06.195919Z",
     "shell.execute_reply": "2026-05-06T13:07:06.194263Z",
     "shell.execute_reply.started": "2026-05-06T13:07:06.180965Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1129.032258064516"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(30 * 500 + 20000 ) / 31"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8830278b-919f-4ab0-90bd-1a6eb12a0e42",
   "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.13.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
