{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "d57869d4-602f-473d-bde5-bf213415fb2f",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-10-14T06:38:41.855704Z",
     "iopub.status.busy": "2025-10-14T06:38:41.855354Z",
     "iopub.status.idle": "2025-10-14T06:38:41.860608Z",
     "shell.execute_reply": "2025-10-14T06:38:41.859652Z",
     "shell.execute_reply.started": "2025-10-14T06:38:41.855676Z"
    }
   },
   "outputs": [],
   "source": [
    "def f(preis,y):\n",
    "    \"\"\"Dies ist nur eine kleine Demo-Funktion für die Vorlesung\n",
    "       Parameter x ist der Preis und Parameter y die Anzahl.\n",
    "    \"\"\"\n",
    "    if preis > 2 and y < preis:\n",
    "        return 2 * preis\n",
    "    else:\n",
    "        return 3 * y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "a47cb62b-207a-4635-9585-369ad2b18996",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-10-14T06:37:49.606575Z",
     "iopub.status.busy": "2025-10-14T06:37:49.606236Z",
     "iopub.status.idle": "2025-10-14T06:37:49.611660Z",
     "shell.execute_reply": "2025-10-14T06:37:49.610827Z",
     "shell.execute_reply.started": "2025-10-14T06:37:49.606548Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "f(2,3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "b4a7e3ec-0b07-40a5-9a56-85c4f6fc3136",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-10-14T06:37:49.907219Z",
     "iopub.status.busy": "2025-10-14T06:37:49.906930Z",
     "iopub.status.idle": "2025-10-14T06:37:49.911493Z",
     "shell.execute_reply": "2025-10-14T06:37:49.910604Z",
     "shell.execute_reply.started": "2025-10-14T06:37:49.907193Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function f in module __main__:\n",
      "\n",
      "f(x, y)\n",
      "    Dies ist nur eine kleine Demo-Funktion für die Vorlesung\n",
      "    Parameter x ist der Preis und Parameter y die Anzahl.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(f)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "9d64bf8b-1d1e-4178-99df-c961db0204b9",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-10-14T06:39:21.396002Z",
     "iopub.status.busy": "2025-10-14T06:39:21.395650Z",
     "iopub.status.idle": "2025-10-14T06:39:21.400108Z",
     "shell.execute_reply": "2025-10-14T06:39:21.399198Z",
     "shell.execute_reply.started": "2025-10-14T06:39:21.395974Z"
    }
   },
   "outputs": [],
   "source": [
    "import math"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "fc2b637b-b3d7-4a85-8d33-abff45ecdca2",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-10-14T06:39:25.015896Z",
     "iopub.status.busy": "2025-10-14T06:39:25.015578Z",
     "iopub.status.idle": "2025-10-14T06:39:25.020802Z",
     "shell.execute_reply": "2025-10-14T06:39:25.019878Z",
     "shell.execute_reply.started": "2025-10-14T06:39:25.015869Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on built-in function cos in module math:\n",
      "\n",
      "cos(x, /)\n",
      "    Return the cosine of x (measured in radians).\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(math.cos)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "a5301b0a-8c27-4621-8eb0-f3f73274418d",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-10-14T06:40:35.315024Z",
     "iopub.status.busy": "2025-10-14T06:40:35.314537Z",
     "iopub.status.idle": "2025-10-14T06:40:35.321243Z",
     "shell.execute_reply": "2025-10-14T06:40:35.320345Z",
     "shell.execute_reply.started": "2025-10-14T06:40:35.314991Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-0.4480736161291701"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "math.cos(90)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "e8426104-f11d-4cea-8223-1b4ce9df2bc3",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-10-14T06:42:31.564748Z",
     "iopub.status.busy": "2025-10-14T06:42:31.564305Z",
     "iopub.status.idle": "2025-10-14T06:42:31.568669Z",
     "shell.execute_reply": "2025-10-14T06:42:31.567868Z",
     "shell.execute_reply.started": "2025-10-14T06:42:31.564714Z"
    }
   },
   "outputs": [],
   "source": [
    "def bogenmass(alpha):\n",
    "    return alpha * 3.14159 / 180"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "a9042b51-1e04-4d13-a48e-212b29fca3b9",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-10-14T06:42:36.055468Z",
     "iopub.status.busy": "2025-10-14T06:42:36.055075Z",
     "iopub.status.idle": "2025-10-14T06:42:36.061361Z",
     "shell.execute_reply": "2025-10-14T06:42:36.060397Z",
     "shell.execute_reply.started": "2025-10-14T06:42:36.055441Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.7853975"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bogenmass(45)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "45901421-c549-4b1e-a824-6cac23542991",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2025-10-14T06:43:14.963312Z",
     "iopub.status.busy": "2025-10-14T06:43:14.962848Z",
     "iopub.status.idle": "2025-10-14T06:43:14.969725Z",
     "shell.execute_reply": "2025-10-14T06:43:14.968836Z",
     "shell.execute_reply.started": "2025-10-14T06:43:14.963279Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.7071072502792263"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "math.cos( bogenmass(45) ) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bb66931c-5b65-4e86-9d9c-b774fa1386fe",
   "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
}
