Corriges - Automate A Pile Exercices

\beginenumerate \item Calculez $3 + 5$. \ifcorrection \begintcolorbox[colback=green!5] \textbfCorrigé : $3 + 5 = 8$. \endtcolorbox \fi

echo "Pile ready in ./pile_exercices and ./pile_corriges" Create one LaTeX file that includes all exercises and their corrections, toggleable with a single flag. pile_exercices.tex \documentclassarticle \usepackageamsmath, amssymb \usepackagetcolorbox \newif\ifcorrection \correctiontrue % Set to \correctionfalse to hide solutions

\item Résoudre $x^2 = 9$. \ifcorrection \begintcolorbox[colback=green!5] \textbfCorrigé : $x = 3$ ou $x = -3$. \endtcolorbox \fi automate a pile exercices corriges

exercises = [] with open(csv_file, 'r', encoding='utf-8') as f: reader = csv.DictReader(f) for row in reader: exercises.append(row)

It sounds like you want to ("une pile d'exercices corrigés"). \beginenumerate \item Calculez $3 + 5$

\sectionExercices

if [[ -f "$cor_file" ]]; then mv "$ex_file" pile_exercices/exercice_$num.md mv "$cor_file" pile_corriges/corrige_$num.md echo "Paired exercise $num" else echo "Missing correction for $num" fi done pile_exercices

% Add more items here \endenumerate

Back
Top