diff --git a/module3/exo3/exercice.ipynb b/module3/exo3/exercice.ipynb index 93d5017083e8883ee719092c408a74822f9411fc..01027fd0eaf3f6bf8d6a79fb8b9e15f5f58b7b7f 100644 --- a/module3/exo3/exercice.ipynb +++ b/module3/exo3/exercice.ipynb @@ -1,24 +1,116 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Analyse des dialogues dans l'Avare de Molière" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Auteur : Emile Pierret" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Nous proposons d'étudier la part de dialogue de chacun des personnages de l'Avare de Molière." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "import pandas as pd\n", + "import isoweek\n", + "import os" + ] + }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 11, "metadata": {}, "outputs": [ { - "ename": "NameError", - "evalue": "name 'hihi' is not defined", + "data": { + "text/plain": [ + "'/home/jovyan/work/module3/exo3'" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "os.getcwd()" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "data_url = \"http://dramacode.github.io/markdown/moliere_avare.txt\"" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "ename": "FileNotFoundError", + "evalue": "[Errno 2] No such file or directory: ' moliere_avare.txt'", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mhihi\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;31mNameError\u001b[0m: name 'hihi' is not defined" + "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mfichier\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\" moliere_avare.txt\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"r\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: ' moliere_avare.txt'" ] } ], "source": [ - "hihi" + "fichier = open(\" moliere_avare.txt\", \"r\")" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['exercice_python_en.org',\n", + " 'exercice_fr.ipynb',\n", + " 'exercice.ipynb',\n", + " 'exercice_fr.Rmd',\n", + " 'exercice_python_fr.org',\n", + " 'exercice_R_en.org',\n", + " 'exercice_R_fr.org',\n", + " 'exercice_en.Rmd',\n", + " 'exercice_en.ipynb',\n", + " '.ipynb_checkpoints']" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "os.listdir()" ] }, {