%%AMC:preprocess_command=prePythonTex4AMC
%%AMC:jobspecific=1
%%AMC:latex_engine=pdflatex --shell-escape
\documentclass{article}
\usepackage[utf8x]{inputenc} 
\usepackage{multicol}	
\usepackage{pythontex}
\usepackage[francais,bloc]{automultiplechoice}  

\begin{document}

\element{qcm}{
\begin{questionmult}{quest1}\bareme{formula=2*NBC-NMC,p=0}
\pyc{a,b,c,d,e=3,2,3,1,5}
\pyc{f,g,h="f","g","h"}
On considère le polynôme du second degré $\py{f}$, défini par $\py{f}(x)=\py{a}(x+\py{b})^2+\py{c}$ 
\begin{multicols}{2}

  \begin{reponses}
  \bonne{$\alpha=\py{-b}$ et $\beta=\py{c}$ }
  \mauvaise{$\alpha=\py{b}$ et $\beta=\py{c}$ }
  \mauvaise{$\alpha=\py{b}$ et $\beta=\py{-c}$ }
  \mauvaise{$\alpha=\py{-b}$ et $\beta=\py{-c}$ }

  \end{reponses}
\end {multicols}
\explain{\color{blue}{\\
D'après le cours, la forme canonique d'un trinôme est $\py{f}(x)=a(x-\alpha)^2+\beta$\\
donc $\alpha=\py{-b}$ et $\beta=\py{c}$
}}
\end{questionmult}
}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Construction des exemplaires
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% nombre d'exemplaires souhaité : 
\exemplaire{1}{    
%%% remise à zéro des numéros de figure pour chaque exemplaire
\setcounter{figure}{0}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% debut de l'en-tête des copies :    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% Identification codée de l'élève (cases à cocher à gauche)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\noindent{\setlength{\parindent}{0pt}\hspace*{\fill}\AMCcode{etu}{2}\hspace*{\fill}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Partie à droite des cases à cocher pour les numéros des élèves
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{minipage}[b]{14 cm}
%%% TITRE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\centering\large\bf Application du cours : Trinôme
%% intitulé
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hspace{1ex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Cadre d'Identification nominative de l'élève
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\hfill\champnom{\fbox{    
   \begin{minipage}{.9\linewidth}
      Nom et prénom :
      
      \vspace*{.5cm}\dotfill
      
      \vspace*{1mm}
    \end{minipage}
  }}\hfill\vspace{1ex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Consignes particulières
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\vspace*{1mm}
%%% intitulé
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{small}
Calculatrice interdite	    

\end{small}

\begin{scriptsize}
Les questions avec \multiSymbole{} peuvent avoir 0, 1 ou plusieurs bonnes réponses.
\end{scriptsize}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\vspace{1ex}
\end{minipage}\hspace*{\fill}
%%% saut de ligne de taille 1mm :
\vspace{0.5cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% creation du qcm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\melangegroupe{qcm}
\restituegroupe{qcm}
\clearpage    
}   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
}
