{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "e7471194",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "6"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "3+3"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4bf6e9e4",
   "metadata": {},
   "source": [
    "# Mon premier titre\n",
    "voici du texte"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "414e5597",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "np.float64(0.8414709848078965)"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "np.sin(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "1df82d8c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[12.3, 13.6, 15.0, 16.7, 10.1, 9.4]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "donnees = [12.3, 13.6, 15.0, 16.7, 10.1, 9.4]\n",
    "donnees"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "8194fecd",
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'moy' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[6], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mmoy\u001b[49m(donnees)\n",
      "\u001b[0;31mNameError\u001b[0m: name 'moy' is not defined"
     ]
    }
   ],
   "source": [
    "moy(donnees)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "196d56aa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "np.float64(12.85)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mean(donnees)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "7e634bcc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[12.3, 13.6, 15.0, 16.7, 10.1, 9.4]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "donnees"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "f3cb2659",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "14.399999999999999"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(donnees[0] + donnees[1] + donnees[2] + donnees[3] )/4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "6733edf7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "np.float64(77.1)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.sum(donnees)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "ecb7215b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "77.1"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sum(donnees)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "6ef0fe0c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "12.85"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "somme = 0\n",
    "for i in range(len(donnees)):\n",
    "    somme = somme + donnees[i]\n",
    "somme/len(donnees)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ec32168b",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "fil_rouge_m8",
   "language": "python",
   "name": "fil_rouge_m8"
  },
  "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.10.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
