Bertrand Benjamin
51ce98c32d
All checks were successful
continuous-integration/drone/push Build is passing
45 lines
1.1 KiB
TeX
Executable File
45 lines
1.1 KiB
TeX
Executable File
\documentclass[a4paper,10pt]{article}
|
|
\usepackage{myXsim}
|
|
\usepackage{minted}
|
|
|
|
\author{Benjamin Bertrand}
|
|
\title{Python et micro:bit - Cours}
|
|
\date{Septembre 2022}
|
|
|
|
\pagestyle{empty}
|
|
|
|
\begin{document}
|
|
|
|
\maketitle
|
|
|
|
\setcounter{section}{1}
|
|
\section{Corpus élémentaire}
|
|
|
|
\subsection{Types de bases}
|
|
|
|
Vous serez amené à utiliser essentiellement 4 types de base:
|
|
|
|
\begin{center}
|
|
\begin{tabular}{p{2cm}cccc}
|
|
Nom & Les entiers signés & Les flottants & Les strings & Les booléens \\
|
|
Type & int & float & str & bool \\
|
|
Affectation &
|
|
\mintinline[bgcolor=base3]{python}{variable = 2} &
|
|
\mintinline[bgcolor=base3]{python}{variable = 2.2} &
|
|
\mintinline[bgcolor=base3]{python}{variable = "2"} &
|
|
\mintinline[bgcolor=base3]{python}{variable = True} \\
|
|
|
|
Opérateurs &
|
|
\texttt{+ - * // \% **}&
|
|
\texttt{+ - * / **}&
|
|
\texttt{+ *}&
|
|
\texttt{or and not} \\
|
|
\end{tabular}
|
|
\end{center}
|
|
|
|
\textbf{L'affectation}, représenté en python par le symbole \texttt{=}, est l'opération qui va associé
|
|
|
|
|
|
|
|
\end{document}
|