{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 12404 characters]\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from math import cos, pi\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "def f(x):\n",
    "    return x**2 - 10*x + 20\n",
    "\n",
    "images = []\n",
    "antecedants = []\n",
    "\n",
    "for x in range(10):\n",
    "    images.append(f(x))\n",
    "    antecedants.append(x)\n",
    "\n",
    "plt.plot(antecedants, images)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 13472 characters]\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from math import cos, pi\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "def g(x):\n",
    "    return -(x - 5)**2 + 5\n",
    "\n",
    "images = []\n",
    "antecedants = []\n",
    "\n",
    "for x in range(15):\n",
    "    images.append(g(x))\n",
    "    antecedants.append(x)\n",
    "\n",
    "plt.plot(antecedants, images)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 28016 characters]\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from math import sin, pi\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "def f(x):\n",
    "    return sin(x*pi/2)\n",
    "\n",
    "min_x = -2\n",
    "max_x = 2\n",
    "\n",
    "images = []\n",
    "antecedants = []\n",
    "\n",
    "x = min_x\n",
    "while x <= max_x:\n",
    "    antecedants.append(x)\n",
    "    images.append(f(x))\n",
    "    x += 1\n",
    "\n",
    "plt.plot(antecedants, images)\n",
    "\n",
    "\n",
    "images = []\n",
    "antecedants = []\n",
    "\n",
    "x = min_x\n",
    "while x <= max_x:\n",
    "    antecedants.append(x)\n",
    "    images.append(f(x))\n",
    "    x += 0.5\n",
    "\n",
    "plt.plot(antecedants, images)\n",
    "\n",
    "\n",
    "images = []\n",
    "antecedants = []\n",
    "\n",
    "x = min_x\n",
    "while x <= max_x:\n",
    "    antecedants.append(x)\n",
    "    images.append(f(x))\n",
    "    x += 0.1\n",
    "\n",
    "plt.plot(antecedants, images)\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "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.7.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
