%%%%%%%%%%%% Attribution %%%%%%%%%%%%
% This template was created by
% Dr. Mahdi A. Khemakhem at PSAU
% and may be copied and used freely for
% non-commercial purposes.
% 01/15/2023
% This template is created based on
% exam document class created
% https://math.mit.edu/~psh/exam/examdoc.pdf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[addpoints,12pt]{exam}
%%%%%%% Uncomment next line and uncomment the previous one to diplay the exam solution %%%%%%%
%\documentclass[12pt,addpoints,answers]{exam} % To print with answers
\linespread{1.2}
\usepackage{gfsartemisia-euler}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{geometry}
\geometry{
a4paper,
%total={170mm,257mm},
left=10mm,
right=10mm,
top=10mm,
bottom=25mm,
}
%%%%%%% To support Arabic language %%%%%%%
\usepackage{arabtex}
\usepackage{utf8}
\setcode{utf8}
%%%%%%% To support PSAU green color and table patterns %%%%%%%
\usepackage{multirow}
\usepackage[table]{xcolor} %To can change colour lines and cells in tables
\definecolor{psaugreen}{RGB}{94,162,154}
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
%%%%%%% Define pages footer %%%%%%%
\usepackage{lastpage}
\lfoot{\textit{Final Exam-CS3701-Operation Systems}}
\cfoot{Page \thepage \hspace{1pt} of \pageref{LastPage}}
\rfoot{\textit{Trimester 2, 2022$\slash$2023}}
\runningfootrule
%%%%%%% Command for exam document class %%%%%%%
\newcommand{\tf}[1][{}]{%
\fillin[#1][0.25in]%
}
\begin{document}
%\pagecolor{yellow!5}
%%%%%%% Print marks in left margin %%%%%%%
\pointsinmargin % To print points in margin
\boxedpoints % or \bracketedpoints
%%%%%%% Include the exam cover defined by the file eaxm_cover.tex %%%%%%%
\include{exam_cover}
\newpage
%%%%%%% Begin exam questions %%%%%%%
\begin{questions}
%%Question 1
\question \textbf{Answer the following}
\begin{parts}
\item Choose the correct answer of the following
\begin{parts}
\part[1] If $x = 2$ and $y = 5 $, then $x+y$ \\
\begin{oneparchoices}
\choice 2
\CorrectChoice 7
\choice 21
\choice 1
\end{oneparchoices}
\part[1] If $x = 12$ and $y = 5 $, then $x+y$ \\
\begin{oneparchoices}
\CorrectChoice 17 \\
\choice $\displaystyle 7$ \\
\choice $\displaystyle 21$ \\
\choice $\displaystyle 1$
\end{oneparchoices}
\part[2] Who invented the pencil
\begin{oneparcheckboxes}
\choice Me
\choice You
\choice They
\choice Him
\CorrectChoice Socrates
\end{oneparcheckboxes}
\end{parts}
\part[2] If $f(x) = \sin(x)$, then $f'(x) = $\fillin.
\part True or False
\begin{parts}
\part[2] \tf[T] The world is all that is the case.
\part[1] \tf[F] My favorite color is blue.
\end{parts}
\end{parts}
%\clearpage
\singlespacing
%%Question 2
\question \textbf{Let $\displaystyle f(x) = \sin(x) + x^2$}
\begin{parts}
\part[4] Compute $\displaystyle \frac{df}{dx} $.\\
\fillwithdottedlines{1.5in}
%%%% To add solutions, add the following and uncomment the seconed line
%%%% in the document \documentclass[12pt,addpoints,answers]{exam} % To print with answers
\begin{solution}
$f'(x) = \cos(x) + 2 x $
\end{solution}
\part[5] Compute $\displaystyle\int_0^1 f(x) \, dx$.\\
\fillwithdottedlines{1.5in}
\begin{solution}
Put here the answer...
\end{solution}
\end{parts}
%%Question 3
\question[10] \textbf{Describe the effect of error propagation on numerical results.}\\
\fillwithdottedlines{2.8in}
%%Question 4
\question
\begin{parts}
\part[3] What do you do with $f(x) = x$?
\fillwithdottedlines{2.8in}
\part[3] Is your answer different if $f(x) = \tan(x)$?
\fillwithdottedlines{1.9in}
\end{parts}
%%Question 4
\question[8]
In no more than one paragraph, explain why the earth is round.
\makeemptybox{1in}
%%Question 4
\question Answer the following
\begin{parts}
\part[1] \label{eqn1}
find $f(2.25)$.
\answerline
\part[1]\label{eqn2}
Approximate $f'(0)$.
\answerline
\part[1]\label{eqn3}
Approximate $\displaystyle \int_{1}^{5} f(x) \: \text{dx}$.
\answerline
\part[5] Redo questions \eqref{eqn1}, \eqref{eqn2} and \eqref{eqn3} with $f(1) = 4$ and $f(2) = 5$.
\fillwithdottedlines{1.2in}
\end{parts}
\end{questions}
\begin{center}
\fbox{\fbox{\parbox{5.5in}{\centering
Hope you all the best! \\
Dr. X Y Z, \quad \quad
Dr. M N T}}}
\includegraphics[width=0.25\textwidth]{logo}
\end{center}
\end{document}