I want to add sections and titles for questions in exam class. I used report class but I am wondering if I can get something similar with exam class . I want something like this (se also the picture),
\documentclass[12pt, a4pape]{exam} % 'twoside' when printing
\pdfcompresslevel=9
\usepackage[margin=2.5cm, twoside]{geometry}
\linespread{1.3}
%\setcounter{secnumdepth}{3}
\usepackage[utf8]{inputenc} % UTF-8 input
\usepackage[english]{babel} % Set language to english
\usepackage{blindtext} % Use \Blinddocument or \blindmathpaper
\usepackage{graphicx,graphics}
%\usepackage{subfig}
\usepackage{color,xcolor,colortbl}
\usepackage{cite}
\graphicspath{ {/Users/farha/Documents} }
\usepackage{fancyhdr}
\usepackage{url}
\usepackage{hyperref}
\def\UrlBreaks{\do\/\do-}
\usepackage{amsmath,amsfonts,amsthm,mathtools,physics,bm}
\usepackage{booktabs,multirow,multicol,tabularx,floatrow,float,makecell,hhline,arydshln}
\usepackage{gensymb}
\usepackage{parskip}
\usepackage[sharp]{easylist}
\usepackage{makeidx,listings,tikz-cd,enumitem}
%\usepackage[linesnumbered,ruled]{algorithm2e}
\usepackage[expansion=false]{microtype}
\usepackage[toc,page]{appendix}
\usepackage[T1]{fontenc}
\usepackage[makeroom]{cancel}
\usepackage{xpatch,lipsum,framed,etoolbox}
\usepackage{geometry,array,subcaption}
\usepackage{placeins,afterpage}
\usepackage{textcomp,siunitx} % to get celsisus degree
\usepackage{pdfpages} % add pdf pages
\usepackage{subfiles}
\usepackage{listings}
\usepackage{ragged2e}
\usepackage[toc,page]{appendix}
%\usepackage[dvipsnames*,svgnames]{xcolor}
\usepackage{tcolorbox}
\usepackage{mdframed}
\begin{document}
\maketitle
%\tableofcontents
\thispagestyle{empty}
\begin{tcolorbox}[width=\textwidth ]
\section*{PART 1\
Without help tools}
\end{tcolorbox}
\begin{questions}
\question Assignment 1 (5 points)
Let f be a function given by $f(x)=x^{3}+\pi x+4$
\begin{parts}
\part
\part
\part
\end{parts}
\question Assignment 2 (5 points)
\begin{parts}
\part
\part
\part
\end{parts}
\end{questions}
\begin{tcolorbox}[width=\textwidtt]
\section*{PART 2 \
With help tools}
\end{tcolorbox}
\begin{questions}
\question Assignment 1 (5 points)
Let f be a function given by $f(x)=x^{3}+\pi x+4$
\begin{parts}
\part
\part
\part
\end{parts}
\question Assignment 2 (5 points)
\begin{parts}
\part
\part
\part
\end{parts}
\end{questions}
\end{document}

\parttitles are tricky, by not uncommon. – John Kormylo Apr 10 '22 at 21:08