diff --git a/2nd/06_Programmation/1B_Programme_Python.pdf b/2nd/06_Programmation/1B_Programme_Python.pdf new file mode 100644 index 0000000..551299a Binary files /dev/null and b/2nd/06_Programmation/1B_Programme_Python.pdf differ diff --git a/2nd/06_Programmation/1B_momie.pdf b/2nd/06_Programmation/1B_momie.pdf deleted file mode 100644 index d5ef373..0000000 Binary files a/2nd/06_Programmation/1B_momie.pdf and /dev/null differ diff --git a/2nd/06_Programmation/1B_momie.tex b/2nd/06_Programmation/1B_momie.tex deleted file mode 100644 index a32f4fd..0000000 --- a/2nd/06_Programmation/1B_momie.tex +++ /dev/null @@ -1,38 +0,0 @@ -\documentclass[a4paper,10pt]{article} -\usepackage{myXsim} - -\author{Benjamin Bertrand} -\title{Programmation - Cours} -\date{Février 2022} - -\pagestyle{empty} - -\begin{document} - -\maketitle - -\section{Programme Python} - -\begin{center} - %\includegraphics[scale=0.6]{./fig/pgm_momie} - \begin{minipage}{0.8\linewidth} - \lstinputlisting[language=Python]{./momie.py} - \end{minipage} -\end{center} - -Contenu du programme - -\afaire{Relever les mots clés, les opérateurs, les variables et les fonctions dans le programme.} - -\begin{itemize} - \item Les mots clés (en vert gras) - \vspace{2cm} - \item Les opérateurs (en rose) - \vspace{2cm} - \item Les variables (en noir) - \vspace{2cm} - \item Les fonctions (en vert) - \vspace{2cm} -\end{itemize} - -\end{document} diff --git a/2nd/06_Programmation/3B_Condition.pdf b/2nd/06_Programmation/3B_Condition.pdf new file mode 100644 index 0000000..92b464d Binary files /dev/null and b/2nd/06_Programmation/3B_Condition.pdf differ diff --git a/2nd/06_Programmation/3B_conditions.pdf b/2nd/06_Programmation/3B_conditions.pdf deleted file mode 100644 index 59f6f30..0000000 Binary files a/2nd/06_Programmation/3B_conditions.pdf and /dev/null differ diff --git a/2nd/06_Programmation/3B_conditions.tex b/2nd/06_Programmation/3B_conditions.tex deleted file mode 100644 index 82a42cc..0000000 --- a/2nd/06_Programmation/3B_conditions.tex +++ /dev/null @@ -1,39 +0,0 @@ -\documentclass[a4paper,10pt]{article} -\usepackage{myXsim} - -\author{Benjamin Bertrand} -\title{Programmation - Cours} -\date{Février 2022} - -\pagestyle{empty} - -\begin{document} - -\maketitle -\setcounter{section}{2} - -\section{Conditions \lstinline{if/elif/else}} - -Quand on veut gérer différent cas de figure, on utilise les mots clés \lstinline{if/elif/else}. - -\begin{center} - \begin{minipage}{0.8\linewidth} - \begin{lstlisting} -age = str(input{Quel age as tu?}) -if age < 2: # si - print("Tu es un bébé") # alors -elif age < 18: #sinon si - print("Tu n'es pas majeur") # alors - print("Tu peux passer le permis") -elif age < 50: #sinon si - print("Tu as moins de la moitier d'un siècle") #alors -else: #sinon - print("Plus d'un demi siècle!") -print("J'ai plus rien à dire")\end{lstlisting} - \end{minipage} -\end{center} - -\paragraph{Remarque:} Il faut faire attention à l'indentation. C'est elle qui détermine où s'arrête le alors. - - -\end{document} diff --git a/2nd/06_Programmation/4B_Boucle_FOR.pdf b/2nd/06_Programmation/4B_Boucle_FOR.pdf new file mode 100644 index 0000000..e23ff3b Binary files /dev/null and b/2nd/06_Programmation/4B_Boucle_FOR.pdf differ diff --git a/2nd/06_Programmation/4B_boucle_for.pdf b/2nd/06_Programmation/4B_boucle_for.pdf deleted file mode 100644 index 14979c5..0000000 Binary files a/2nd/06_Programmation/4B_boucle_for.pdf and /dev/null differ diff --git a/2nd/06_Programmation/4B_boucle_for.tex b/2nd/06_Programmation/4B_boucle_for.tex deleted file mode 100644 index 46b0420..0000000 --- a/2nd/06_Programmation/4B_boucle_for.tex +++ /dev/null @@ -1,54 +0,0 @@ -\documentclass[a4paper,10pt]{article} -\usepackage{myXsim} - -\author{Benjamin Bertrand} -\title{Programmation - Cours} -\date{Février 2022} - -\pagestyle{empty} - -\begin{document} - -\maketitle -\setcounter{section}{3} - -\section{Boucle \lstinline{for}} - -Quand on veut \textbf{faire} quelque chose un nombre de foi \textbf{connus}, on utilise une boucle \lstinline{for}. - -\begin{multicols}{2} - \begin{minipage}{0.8\linewidth} - \begin{lstlisting} -for i in range(3): - print("Coucou")\end{lstlisting} - Le programme va afficher - \vspace{2cm} - \end{minipage} - - \begin{minipage}{0.8\linewidth} - \begin{lstlisting} -somme = 0 -for i in range(4): - somme = somme + i -print(somme)\end{lstlisting} - Le programme va afficher - \vspace{1cm} - - Tableau des variables - - \begin{center} - \begin{tabular}{c|c} - i & somme \\ - \hline - & \\ - & \\ - & \\ - \end{tabular} - \end{center} - - \end{minipage} -\end{multicols} - -\afaire{Prévoir ce que vont afficher ces deux programmes et compléter le tableau des variables} - -\end{document} diff --git a/2nd/06_Programmation/5B_Boucle_WHILE.pdf b/2nd/06_Programmation/5B_Boucle_WHILE.pdf new file mode 100644 index 0000000..8c3f3f4 Binary files /dev/null and b/2nd/06_Programmation/5B_Boucle_WHILE.pdf differ diff --git a/2nd/06_Programmation/5B_boucle_while.pdf b/2nd/06_Programmation/5B_boucle_while.pdf deleted file mode 100644 index c40d9b5..0000000 Binary files a/2nd/06_Programmation/5B_boucle_while.pdf and /dev/null differ diff --git a/2nd/06_Programmation/5B_boucle_while.tex b/2nd/06_Programmation/5B_boucle_while.tex deleted file mode 100644 index 99d6f6c..0000000 --- a/2nd/06_Programmation/5B_boucle_while.tex +++ /dev/null @@ -1,52 +0,0 @@ -\documentclass[a4paper,10pt]{article} -\usepackage{myXsim} - -\author{Benjamin Bertrand} -\title{Programmation - Cours} -\date{Février 2022} - -\pagestyle{empty} - -\begin{document} - -\maketitle -\setcounter{section}{4} - -\section{Boucle \lstinline{while}} - -Quand on veut \textbf{faire} quelque chose \textbf{tant que} quelque chose reste vrai, on utilise une boucle \lstinline{while}. - -\begin{multicols}{3} - \begin{minipage}{0.8\linewidth} - \begin{lstlisting} -n = 0 -u = 1 -print(u) -while n < 5: - n = n + 1 - u = u * 2 - print(u)\end{lstlisting} - \end{minipage} - - \columnbreak - - Tableau des variables - \begin{center} - \begin{tabular}{c|c} - n & u \\ - \hline - & \\ - & \\ - & \\ - \end{tabular} - \end{center} - \columnbreak - - Le programme va afficher - - -\end{multicols} - -\afaire{Prévoir ce que vont afficher ces deux programmes et compléter le tableau des variables} - -\end{document}