\frametitle{Modules and Packages}
\begin{lstlisting}[language=Python]
import math
import random

print(f"PI: {math.pi}")
print(f"Square root of 16: {math.sqrt(16)}")

from random import randint
# Since we imported 'randint' directly, we don't need 'random.'
print(f"Random number between 1 and 10: {randint(1, 10)}")
  \end{lstlisting}

  \begin{itemize}
    \item Modules are Python files (\texttt{.py}) that contain
      functions, classes, and variables.

    \item They allow you to organize and reuse code.
    \item \texttt{import} is used to include modules.
    \item \texttt{from ... import ...} is used to import specific
      elements from a module.
  \end{itemize}
