%%AMC:preprocess_command=./prePythonTex4AMC
%%AMC:jobspecific=1
%%AMC:latex_engine=pdflatex --shell-escape

\documentclass[a4paper]{article}


\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
%%% paquet permettant de préremplir les copies avec les noms des candidats
\usepackage{csvsimple}


%\usepackage[francais,bloc,insidebox]{automultiplechoice}
\usepackage[francais,bloc,pdfform]{automultiplechoice}
%\usepackage[francais,bloc]{automultiplechoice}




% ---------- Utilisation de codes Python -----
\usepackage{pythontex}
%----------------------------------------------



%===================
\begin{document}
%===================



% couleurs définies pour le tracé des parallélogrammes de correction
\definecolor{ffttww}{rgb}{1,0.2,0.4}
\definecolor{xdxdff}{rgb}{0.49,0.49,1}
\definecolor{zzttqq}{rgb}{0.6,0.2,0}
\definecolor{qqqqff}{rgb}{0,0,1}
\definecolor{cqcqcq}{rgb}{0.75,0.75,0.75}
\definecolor{ttqqff}{rgb}{0.2,0,1}
\definecolor{ffqqtt}{rgb}{1,0,0.2}
\definecolor{qqqqff}{rgb}{0,0,1}
\definecolor{ffqqww}{rgb}{1,0,0.4}
\definecolor{qqcctt}{rgb}{0,0.8,0.2}
\definecolor{uququq}{rgb}{0.25,0.25,0.25}
\definecolor{qqwwff}{rgb}{0,0.4,1}
\definecolor{zzzzzz}{rgb}{0.6,0.6,0.6}

\definecolor{fondcorrection}{RGB}{240,247,255}
\definecolor{fondPYTHON}{RGB}{255,254,220}

\definecolor{bleufonce}{rgb}{0.0, 0.0, 1.0}
\definecolor{vertfonce}{rgb}{0.0, 0.5, 0.0}

\definecolor{qqwwff}{rgb}{0,0.4,1}
\definecolor{xdxdff}{rgb}{0.49,0.49,1}
\definecolor{qqqqff}{rgb}{0,0,1}


                  
\newcommand{\consignecadre}{\textit{{\tiny Donnez votre réponse et vos explications ici :}}}

%----------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                            début des questions                              %%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\element{Test01}{
\begin{question}{Test01-Q001}
	
Test avec variable VALUE égale à 0

	\pyc{value=0}

\begin{choiceshoriz}
	\pys{\ifnum!{value}=0\correctchoice{0}\else\wrongchoice{0}\fi}
	\pys{\ifnum!{value}=1\correctchoice{1}\else\wrongchoice{1}\fi}
	\pys{\ifnum!{value}=2\correctchoice{2}\else\wrongchoice{2}\fi}
	\pys{\ifnum!{value}=3\correctchoice{3}\else\wrongchoice{3}\fi}
\end{choiceshoriz}
			
			
\AMCtext{explain}{\textit{\textbf{\textcolor{blue}{Correction : }}}}
 \explain{

\noindent\fcolorbox{fondcorrection}{fondcorrection}{%
\begin{minipage}{\dimexpr0.99\textwidth-2\fboxrule-2\fboxsep\relax}


\end{minipage}
}}
 
\end{question}
}


\element{Test01}{
\begin{question}{Test01-Q002}
	
Test avec variable VALUE égale à 1

	\pyc{value=1}

\begin{choiceshoriz}
	\pys{\ifnum!{value}=0\correctchoice{0}\else\wrongchoice{0}\fi}
	\pys{\ifnum!{value}=1\correctchoice{1}\else\wrongchoice{1}\fi}
	\pys{\ifnum!{value}=2\correctchoice{2}\else\wrongchoice{2}\fi}
	\pys{\ifnum!{value}=3\correctchoice{3}\else\wrongchoice{3}\fi}
\end{choiceshoriz}
			
			
\AMCtext{explain}{\textit{\textbf{\textcolor{blue}{Correction : }}}}
 \explain{

\noindent\fcolorbox{fondcorrection}{fondcorrection}{%
\begin{minipage}{\dimexpr0.99\textwidth-2\fboxrule-2\fboxsep\relax}


\end{minipage}
}}
 
\end{question}
}

\element{Test01}{
\begin{question}{Test01-Q003}
	
Test avec variable VALUE égale à 2

	\pyc{value=2}

\begin{choiceshoriz}
	\pys{\ifnum!{value}=0\correctchoice{0}\else\wrongchoice{0}\fi}
	\pys{\ifnum!{value}=1\correctchoice{1}\else\wrongchoice{1}\fi}
	\pys{\ifnum!{value}=2\correctchoice{2}\else\wrongchoice{2}\fi}
	\pys{\ifnum!{value}=3\correctchoice{3}\else\wrongchoice{3}\fi}
\end{choiceshoriz}
			
			
\AMCtext{explain}{\textit{\textbf{\textcolor{blue}{Correction : }}}}
 \explain{

\noindent\fcolorbox{fondcorrection}{fondcorrection}{%
\begin{minipage}{\dimexpr0.99\textwidth-2\fboxrule-2\fboxsep\relax}


\end{minipage}
}}
 
\end{question}
}

\element{Test01}{
\begin{question}{Test01-Q004}
	
Test avec variable VALUE égale à 3

	\pyc{value=3}

\begin{choiceshoriz}
	\pys{\ifnum!{value}=0\correctchoice{0}\else\wrongchoice{0}\fi}
	\pys{\ifnum!{value}=1\correctchoice{1}\else\wrongchoice{1}\fi}
	\pys{\ifnum!{value}=2\correctchoice{2}\else\wrongchoice{2}\fi}
	\pys{\ifnum!{value}=3\correctchoice{3}\else\wrongchoice{3}\fi}
\end{choiceshoriz}
			
			
\AMCtext{explain}{\textit{\textbf{\textcolor{blue}{Correction : }}}}
 \explain{

\noindent\fcolorbox{fondcorrection}{fondcorrection}{%
\begin{minipage}{\dimexpr0.99\textwidth-2\fboxrule-2\fboxsep\relax}


\end{minipage}
}}
 
\end{question}
}




%----------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                            Fin des questions                                %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                      Fabrication des copies                                 %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\sujet}{

\exemplaire{1}{ 

%%%                          ENTETE DE LE COPIE                                 %%%

\def\AMCotextReserved{\emph{\textit{{\footnotesize Donnez votre réponse et vos explications ci-dessous :}}}}



\cleargroup{tout}
	\copygroup{Test01}{tout}
\restituegroupe{tout}


%\rule{15cm}{1mm}
%
%   \noindent\fcolorbox{fondcorrection}{fondcorrection}{
%
%\begin{tabular}{m{1cm}m{12.7cm}}
%\includegraphics[scale=0.5]{images/Rappel.png}  & \textbf{Cette évaluation se termine ici. Vérifiez que vous avez bien choisi vos pourcentages de certitude.} \textit{Un pourcentage non coché sera par défaut à 0\%.} \\ 
%\end{tabular} 
%}
%\rule{15cm}{1mm}
%


%\AMCcleardoublepage    


}
\AMCassociation{\id}
 }

\csvreader[head to column names]{ListeElevesUn.csv}{}{\sujet}


\end{document}
