Import work from year 2014-2015

This commit is contained in:
Benjamin Bertrand
2017-06-16 09:48:07 +03:00
commit 7e5feb002b
1531 changed files with 418856 additions and 0 deletions

View File

@@ -0,0 +1,322 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 87,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"import pandas as pd\n",
"from texenv import texenv\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 88,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"notes = pd.read_excel(\"./../../../notes_1stmg.xls\",sheetname=\"DS_0320\")"
]
},
{
"cell_type": "code",
"execution_count": 89,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"Index(['DS_0320', 'av_arrondi', 'Exercice 1', '1 (double inclusion)', '2 (double inclusion)', '3 (proportion)', 'Exercice 2', '1 (Remplir tableau)', '2.a (calculer proportion)', '2.b (calculer proportion)', '2.c (proportion parmi)', '2.d (proportion parmi)', 'Exercice 3', '1 (completer arbre)', '2.a (proportion feuille)', '2.b (proportion feuille)', '2.c (proportion ou)', '3 (calculer quantité)', 'Exercice 4', '1 (tracer fonction)', '2 (maximum)'], dtype='object')"
]
},
"execution_count": 89,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"notes.index"
]
},
{
"cell_type": "code",
"execution_count": 90,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"notes = notes.T"
]
},
{
"cell_type": "code",
"execution_count": 91,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"notes = notes.drop(\"av_arrondi\", axis=1)"
]
},
{
"cell_type": "code",
"execution_count": 92,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"barem = notes[:1]\n",
"notes = notes[1:]"
]
},
{
"cell_type": "code",
"execution_count": 93,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"notes = notes[notes[\"DS_0320\"].notnull()]"
]
},
{
"cell_type": "code",
"execution_count": 94,
"metadata": {
"collapsed": false
},
"outputs": [
{
"ename": "ValueError",
"evalue": "could not convert string to float: ",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-94-7ea0c14a88f0>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mnotes\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mnotes\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfloat\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;32m/home/lafrite/.virtualenvs/data_analysis/lib/python3.4/site-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mastype\u001b[1;34m(self, dtype, copy, raise_on_error)\u001b[0m\n\u001b[0;32m 2212\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2213\u001b[0m mgr = self._data.astype(\n\u001b[1;32m-> 2214\u001b[1;33m dtype=dtype, copy=copy, raise_on_error=raise_on_error)\n\u001b[0m\u001b[0;32m 2215\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_constructor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmgr\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__finalize__\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2216\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m/home/lafrite/.virtualenvs/data_analysis/lib/python3.4/site-packages/pandas/core/internals.py\u001b[0m in \u001b[0;36mastype\u001b[1;34m(self, dtype, **kwargs)\u001b[0m\n\u001b[0;32m 2500\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2501\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mastype\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2502\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'astype'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2503\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2504\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mconvert\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m/home/lafrite/.virtualenvs/data_analysis/lib/python3.4/site-packages/pandas/core/internals.py\u001b[0m in \u001b[0;36mapply\u001b[1;34m(self, f, axes, filter, do_integrity_check, **kwargs)\u001b[0m\n\u001b[0;32m 2455\u001b[0m copy=align_copy)\n\u001b[0;32m 2456\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2457\u001b[1;33m \u001b[0mapplied\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mb\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mf\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2458\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2459\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mapplied\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mlist\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m/home/lafrite/.virtualenvs/data_analysis/lib/python3.4/site-packages/pandas/core/internals.py\u001b[0m in \u001b[0;36mastype\u001b[1;34m(self, dtype, copy, raise_on_error, values)\u001b[0m\n\u001b[0;32m 369\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mastype\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mraise_on_error\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mvalues\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 370\u001b[0m return self._astype(dtype, copy=copy, raise_on_error=raise_on_error,\n\u001b[1;32m--> 371\u001b[1;33m values=values)\n\u001b[0m\u001b[0;32m 372\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 373\u001b[0m def _astype(self, dtype, copy=False, raise_on_error=True, values=None,\n",
"\u001b[1;32m/home/lafrite/.virtualenvs/data_analysis/lib/python3.4/site-packages/pandas/core/internals.py\u001b[0m in \u001b[0;36m_astype\u001b[1;34m(self, dtype, copy, raise_on_error, values, klass)\u001b[0m\n\u001b[0;32m 399\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mvalues\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 400\u001b[0m \u001b[1;31m# _astype_nansafe works fine with 1-d only\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 401\u001b[1;33m \u001b[0mvalues\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcom\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_astype_nansafe\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mravel\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 402\u001b[0m \u001b[0mvalues\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mvalues\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mreshape\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 403\u001b[0m newb = make_block(values,\n",
"\u001b[1;32m/home/lafrite/.virtualenvs/data_analysis/lib/python3.4/site-packages/pandas/core/common.py\u001b[0m in \u001b[0;36m_astype_nansafe\u001b[1;34m(arr, dtype, copy)\u001b[0m\n\u001b[0;32m 2627\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2628\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mcopy\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2629\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[0marr\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2630\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0marr\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mview\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2631\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mValueError\u001b[0m: could not convert string to float: "
]
}
],
"source": [
"notes = notes.astype(float)"
]
},
{
"cell_type": "code",
"execution_count": 95,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"count 31\n",
"unique 18\n",
"top 11\n",
"freq 5\n",
"Name: DS_0320, dtype: float64"
]
},
"execution_count": 95,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"notes['DS_0320'].describe()"
]
},
{
"cell_type": "code",
"execution_count": 96,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"list_exo = [\"Exercice 1\", \"Exercice 2\", \"Exercice 3\", \"Exercice 4\"]"
]
},
{
"cell_type": "code",
"execution_count": 97,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"notes[list_exo] = notes[list_exo].applymap(lambda x:round(x,2))"
]
},
{
"cell_type": "code",
"execution_count": 98,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"def toRepVal(val):\n",
" if pd.isnull(val):\n",
" return \"\\\\NoRep\"\n",
" elif val == 0:\n",
" return \"\\\\RepZ\"\n",
" elif val == 1:\n",
" return \"\\\\RepU\"\n",
" elif val == 2:\n",
" return \"\\\\RepD\"\n",
" elif val == 3:\n",
" return \"\\\\RepT\"\n",
" else:\n",
" return val"
]
},
{
"cell_type": "code",
"execution_count": 99,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"['1 (double inclusion)',\n",
" '2 (double inclusion)',\n",
" '3 (proportion)',\n",
" '1 (Remplir tableau)',\n",
" '2.a (calculer proportion)',\n",
" '2.b (calculer proportion)',\n",
" '2.c (proportion parmi)',\n",
" '2.d (proportion parmi)',\n",
" '1 (completer arbre)',\n",
" '2.a (proportion feuille)',\n",
" '2.b (proportion feuille)',\n",
" '2.c (proportion ou)',\n",
" '3 (calculer quantité)',\n",
" '1 (tracer fonction)',\n",
" '2 (maximum)']"
]
},
"execution_count": 99,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sous_exo = [i for i in notes.T.index if i not in list_exo + ['DS_0320']]\n",
"sous_exo"
]
},
{
"cell_type": "code",
"execution_count": 100,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"notes[sous_exo] = notes[sous_exo].applymap(toRepVal)"
]
},
{
"cell_type": "code",
"execution_count": 101,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"Index(['DS_0320', 'Exercice 1', '1 (double inclusion)', '2 (double inclusion)', '3 (proportion)', 'Exercice 2', '1 (Remplir tableau)', '2.a (calculer proportion)', '2.b (calculer proportion)', '2.c (proportion parmi)', '2.d (proportion parmi)', 'Exercice 3', '1 (completer arbre)', '2.a (proportion feuille)', '2.b (proportion feuille)', '2.c (proportion ou)', '3 (calculer quantité)', 'Exercice 4', '1 (tracer fonction)', '2 (maximum)'], dtype='object')"
]
},
"execution_count": 101,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"notes.T.index"
]
},
{
"cell_type": "code",
"execution_count": 102,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"bilan = texenv.get_template(\"tpl_bilan.tex\")\n",
"with open(\"./bilan.tex\",\"w\") as f:\n",
" f.write(bilan.render(eleves = notes, barem = barem))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"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.4.3"
}
},
"nbformat": 4,
"nbformat_minor": 0
}

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env python
# encoding: utf-8
import jinja2, os
# Definition of jinja syntax for latex
texenv = jinja2.Environment(
block_start_string = '\Block{',
# Gros WTF!! Si on le met en maj ça ne marche pas alors que c'est en maj dans le template...
block_end_string = '}',
variable_start_string = '\Var{',
variable_end_string = '}',
loader = jinja2.FileSystemLoader(os.path.abspath('.')),
extensions = ['jinja2.ext.do']
)
# Filters
if __name__ == '__main__':
from pymath.expression import Expression
exp = Expression("2/4 + 18")
print(do_calculus(exp.simplify()))
# -----------------------------
# Reglages pour 'vim'
# vim:set autoindent expandtab tabstop=4 shiftwidth=4:
# cursor: 16 del

View File

@@ -0,0 +1,79 @@
\documentclass{/media/documents/Cours/Prof/Enseignements/Archive/2014-2015/tools/style/classBilan}
\usepackage{/media/documents/Cours/Prof/Enseignements/Archive/2014-2015/2014_2015}
\usepackage{multicol}
% Title Page
\titre{DS 5}
% \seconde \premiereS \PSTMG \TSTMG
\classe{\PSTMG}
\date{20 mars 2015}
\begin{document}
\Block{for (name, notes) in eleves.iterrows()}
\maketitle
\begin{minipage}{0.5\linewidth}
\large
\Var{name}
\end{minipage}
\begin{minipage}{0.3\linewidth}
\begin{flushright}
\Large \Var{notes['DS_0320']} / \Var{barem.DS_0320[0]}
\end{flushright}
\end{minipage}
\vfill
\fbox{%
\begin{minipage}{0.9\linewidth}
\hfill
\vspace{2cm}
\end{minipage}
}
\vfill
\scriptsize
\begin{multicols}{2}
\begin{tabular}{|p{3cm}|c|c|}
\hline
\rowcolor{highlightbg} Exercices & Réussite & Barème \\
\hline
\Block{for question in barem.T[1:10].T}
\Var{question} & \Var{notes[question]} & \Var{barem[question][0]} \\
\hline
\Block{endfor}
\end{tabular}
\begin{tabular}{|p{3cm}|c|c|}
\hline
\rowcolor{highlightbg} Exercices & Réussite & Barème \\
\hline
\Block{for question in barem.T[10:].T}
\Var{question} & \Var{notes[question]} & \Var{barem[question][0]} \\
\hline
\Block{endfor}
\end{tabular}
\end{multicols}
%\begin{tabular}{|p{2cm}|p{2cm}|p{2cm}|p{2cm}|p{2cm}|}
% \hline
% Pas de réponse & Faux & Peu juste & Partiellement juste & Juste \\
% \hline
% \NoRep & \RepZ & \RepU & \RepD & \RepT \\
% \hline
%\end{tabular}
\normalsize
\pagebreak
\Block{endfor}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "master"
%%% End:

Binary file not shown.

View File

@@ -0,0 +1,240 @@
\documentclass[a4paper,10pt, table]{/media/documents/Cours/Prof/Enseignements/Archive/2014-2015/tools/style/classDS}
\usepackage{/media/documents/Cours/Prof/Enseignements/Archive/2014-2015/2014_2015}
% Title Page
\titre{5}
% \seconde \premiereS \PSTMG \TSTMG
\classe{\PSTMG}
\date{20 mars 2015}
\duree{1 heure}
%\sujet{%{{infos.subj%}}}
% DS DSCorr DM DMCorr Corr
\typedoc{DS}
\printanswers
\begin{document}
\maketitle
Le barème est donné à titre indicatif, il pourra être modifié.
\hfill
\begin{questions}
\question[5]
Dans cet exercice, toutes les questions sont indépendantes.
\begin{parts}
\part Dans un lycée, il y avait 97 élèves en secondes. 92\% sont passés en première et parmi ceux qui sont passé en première, 35\% sont passé en STMG.\\
Combien d'élèves sont allés en STMG?
\begin{solution}
Nombre d'élèves qui sont passés en première
\begin{eqnarray*}
97 \times \frac{92}{100} & = & 89,24 \approx 89
\end{eqnarray*}
Nombre d'élèves qui sont allés en STMG
\begin{eqnarray*}
89.24 \times \frac{35}{100} & = & 31,2 \approx 31
\end{eqnarray*}
31 élèves sont allés en première STMG cette année là.
\end{solution}
\part La DVDthèque de Villeneuve est composée de 30\% de films d'action et, parmi ces films d'actions, 60\% sont des films de Bruce Willis. \\
Quelle est la proportion de film de Bruce Willis dans la collection de Villeneuve (On considèrera que Bruce Willis ne fait que des films d'action)?
\begin{solution}
Proportion des films de Bruce Willis:
\begin{eqnarray*}
p\times p' & = & \frac{30}{100} \times \frac{60}{100} = 0,18 = 18\%
\end{eqnarray*}
18\% des films sont des films de Bruce Willis.
\end{solution}
\part Entendu à la radio en juillet 2004: "16\% des français ne partent pas en vacances, ce qui représente dix millions de personnes".\\
D'après cette information, de combien était la population française en 2004?
\begin{solution}
On peut faire un produit en croix pour se représenter la situation
\begin{center}
\begin{tabular}{|c|c|p{2cm}|}
\hline
& \% & nombre de personnes (en milions) \\
\hline
En vacances & 16 & 10 \\
\hline
En France & 100 & ?? \\
\hline
\end{tabular}
\end{center}
Donc la population française était de
\begin{eqnarray*}
\frac{10 \times 100}{16} & = & 62,5
\end{eqnarray*}
Il y avait 62,5 milions de personnes en France.
\end{solution}
\end{parts}
\hfill
\question[6]
Un Fastfood veut analyser sa clientèle. Durant le semaine qui vient de passer, il a vendu 1500 repas répartis en trois catégories: 330 menus, 735 salades et des pizzas. Tous ces repas étaient pris soit sur place soit à emporter.
On compte 60\% des repas ont été à emporter et parmi ces derniers 20\% étaient des menus.
De plus, 55\% des repas pris sur place étaient des salades.
\begin{parts}
\part Compléter ce tableau en justifiant les calculs.
\begin{center}
\begin{tabular}{|c|*{4}{c|}}
\hline
& Menu & Salades & pizza & Total \\
\hline
Sur place & &&& \\
\hline
À emporter &&&& \\
\hline
Total &&&& \\
\hline
\end{tabular}
\end{center}
\begin{solution}
\includegraphics[scale=.8]{./fig/tableur}
\end{solution}
\part À l'aide de ce tableau déterminer les proportions suivantes
\begin{subparts}
\subpart Proportion de repas à emporter.
\begin{solution}
Cette donnée était dans l'énoncé: 60\%
\end{solution}
\subpart Proportion salade sur place.
\begin{solution}
\begin{eqnarray*}
\frac{\mbox{Nombre de salade sur place}}{\mbox{Nombre de repas}} & = & \frac{330}{1500} = 0,22 = 22\%
\end{eqnarray*}
\end{solution}
\subpart Proportion pizza parmi les repas à emporter.
\begin{solution}
\begin{eqnarray*}
\frac{\mbox{Nombre de pizza à emporter }}{\mbox{Nombre de repas à emporter}} & = & \frac{315}{900} = 0,35 = 35\%
\end{eqnarray*}
\end{solution}
\subpart Proportion des plats à emporter parmi les menus.
\begin{solution}
\begin{eqnarray*}
\frac{\mbox{Nombre de menu à emporter}}{\mbox{Nombre de menu}} & = & \frac{180}{330} = 0.55 = 55\%
\end{eqnarray*}
\end{solution}
\end{subparts}
\end{parts}
\clearpage
\hfill
\question[6]
L'entreprise SAPIQ commercialise des pots de moutarde de 800~g. Un pot est déclaré \textbf{conforme} s'il contient entre 790~g et 810~g de moutarde.
L'entreprise dispose de deux machines $m_{1}$ et $m_{2}$.
La première machine $m_{1}$ produit 65\,\% des pots fabriqués par l'entreprise, le reste de la fabrication étant assuré par la machine $m_{2}$.
7\,\% des pots produits par la machine $m_{1}$ sont non conformes, alors que la proportion de pots non conformes produits par la la machine $m_{2}$ est de 2\,\% seulement.
\begin{parts}
\part Compléter l'arbre suivant
\begin{minipage}[c]{0.5\textwidth}
\begin{tikzpicture}[scale=0.8]
\node (root) at (0,0) {$\bullet$};
\node (Mu) at (-3, -2) {$M_1$};
\node (MuNC) at (-4, -5) {$NC$};
\node (MuC) at (-1, -5) {$C$};
\node (Md) at (3, -2) {$M_2$};
\node (MdNC) at (1, -5) {$NC$};
\node (MdC) at (4, -5) {$C$};
\draw[->] (root) -- (Mu) node[midway, left] {...};
\draw[->] (Mu) -- (MuNC) node[midway, left] {...};
\draw[->] (Mu) -- (MuC) node[midway, right] {...};
\draw[->] (root) -- (Md) node[midway, right] {...};
\draw[->] (Md) -- (MdNC) node[midway, left] {...};
\draw[->] (Md) -- (MdC) node[midway, right] {...};
\end{tikzpicture}
\end{minipage}
\begin{minipage}[c]{0.5\textwidth}
\begin{itemize}
\item $M_1$ désigne les pots produits par $m_1$
\item $M_2$ désigne les pots produits par $m_2$
\item $C$ désigne les pots conformes.
\item $NC$ désigne les pots non conformes.
\end{itemize}
\end{minipage}
\part À l'aide de cet arbre déterminer les proportions suivantes
\begin{subparts}
\subpart Proportion des pots non conformes produits par $m_1$.
\begin{solution}
On veut la proportion de la feuille en vert \TODO{la colorier}
\begin{eqnarray*}
\frac{65}{100} \times \frac{7}{100} & = & 0,0434 = 4.55\%
\end{eqnarray*}
\end{solution}
\subpart Proportion des pots conformes.
\begin{solution}
On veut la proportion des feuilles en bleu \TODO{à faire}
\begin{eqnarray*}
\frac{65}{100} \times \frac{93}{100} + \frac{35}{100} \times \frac{98}{100} & = & 0,9475 = 94,75\%
\end{eqnarray*}
\end{solution}
\subpart Proportion des pots conformes ou produit par la machine $m_1$
\begin{solution}
On veut la proportion des feuilles soulignées
\begin{eqnarray*}
\frac{65}{100}\times \frac{93}{100} + \frac{35}{100} \times \frac{98}{100} + \frac{65}{100}\times \frac{7}{100} & = & 0,993 = 99,3\%
\end{eqnarray*}
\end{solution}
\end{subparts}
\part On suppose que l'entreprise à produit 100 000 pots. Combien ne sont pas conformes?
\begin{solution}
On calcule la proportion des pots non conformes
\begin{eqnarray*}
\frac{65}{100} \times \frac{7}{100} + \frac{35}{100} \times \frac{2}{100} & = & 0,0525 = 5,25\%
\end{eqnarray*}
Puis on calcule le nombre de pots non conformes
\begin{eqnarray*}
100 000 \times 0.0525 & = & 5250
\end{eqnarray*}
Il y aura 1940 pots non conformes.
\end{solution}
\end{parts}
\hfill
\question[3]
\begin{parts}
\part Tracer la une fonction qui correspond au tableau de variation suivant
\hspace{-1cm}
\begin{tikzpicture}
\tkzTabInit[espcl=2]{$x$/1,$f(x)$/3}{-3, -1, 0, 2, 3, $+\infty$}
\tkzTabVar{+/{1}, -/{-2}, +/{3}, -/{2}, +/{4}, -/{}}
\end{tikzpicture}
\part Quel est le maximum de la fonction $f$ pour quelle valeur de $x$ est-il atteint?
\end{parts}
\hfill
\end{questions}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "master"
%%% End:

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -0,0 +1,19 @@
Notes sur DS_0320
#################
:date: 2015-07-01
:modified: 2015-07-01
:tags: DS, Information_chifree, Proba, Fonctions
:category: 1er_STMG
:authors: Benjamin Bertrand
:summary: Pas de résumé, note créée automatiquement parce que je ne l'avais pas bien fait...
`Lien vers DS_0320.tex <DS_0320.tex>`_
`Lien vers tableur.ods <tableur.ods>`_
`Lien vers DS_0320.pdf <DS_0320.pdf>`_
`Lien vers fig/tableur.png <fig/tableur.png>`_

Binary file not shown.