Feat: import des bilans de Camille
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
20a5163b7f
commit
adb2899990
BIN
2nd/06_Programmation/1B_Programme_Python.pdf
Normal file
BIN
2nd/06_Programmation/1B_Programme_Python.pdf
Normal file
Binary file not shown.
Binary file not shown.
@ -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}
|
BIN
2nd/06_Programmation/3B_Condition.pdf
Normal file
BIN
2nd/06_Programmation/3B_Condition.pdf
Normal file
Binary file not shown.
Binary file not shown.
@ -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}
|
BIN
2nd/06_Programmation/4B_Boucle_FOR.pdf
Normal file
BIN
2nd/06_Programmation/4B_Boucle_FOR.pdf
Normal file
Binary file not shown.
Binary file not shown.
@ -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}
|
BIN
2nd/06_Programmation/5B_Boucle_WHILE.pdf
Normal file
BIN
2nd/06_Programmation/5B_Boucle_WHILE.pdf
Normal file
Binary file not shown.
Binary file not shown.
@ -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}
|
Loading…
Reference in New Issue
Block a user