Question Paper
Author
Aashique Unnikrishnan
Last Updated
3 года назад
License
Creative Commons CC BY 4.0
Аннотация
A template for typesetting question papers
\documentclass[12pt, a4paper]{article}
\RequirePackage[utf8]{inputenc}
\RequirePackage{multicol}
\RequirePackage{ragged2e}
\RequirePackage{graphicx}
\RequirePackage{amsmath}
\RequirePackage{xcolor}
\RequirePackage{geometry}
\RequirePackage{caption}
\RequirePackage{subcaption}
\RequirePackage{enumitem}
\geometry{top = 2.5cm, bottom = 2.5cm, left = 1.5cm, right = 1.5cm}
\makeatletter
\def\vhrulefill#1{\leavevmode\leaders\hrule\@height#1\hfill \kern\z@}
\makeatother
%-----------------------------------------------------------
% TO START EDITING THE DOCUMENT JUMP TO LINE 148
%-----------------------------------------------------------
\title{Question Paper}
\author{}
\date{November 2021}
%------------------------------------------------------------
% HEADER INFORMATION
%------------------------------------------------------------
\newcommand{\hdr}[6]{
\begin{center}
{\Huge #1}\\#2\\\vspace{5mm}
{\Large \textbf{#3\vspace{2.5mm}\\#4}}\\
\end{center}
\begin{raggedleft}
{\large \textbf{#5 \hfill #6}\\}\vspace{3mm}
\vhrulefill{5pt}
\end{raggedleft}}
%------------------------------------------------------------
% GENERAL INSTRUCTIONS
%------------------------------------------------------------
\newcommand{\geninstructions}[1]{
\begin{raggedright}
\vspace{3mm}
\textbf{\large INSTRUCTIONS}
\textit{
\begin{itemize}
#1
\end{itemize}}
\hrulefill\\
\hrulefill \\\vspace{5mm}
\end{raggedright}}
%-----------------------------------------------------------
% QUESTION SECTION
%-----------------------------------------------------------
\newcommand{\questionsection}[3]{
\vspace{2.5mm}
\begin{center}
\textbf{\large \underline{SECTION - #1}}\\
{\small \textbf{#2}}
\end{center}
{\small
\textit{\begin{itemize}[noitemsep, topsep=0pt]
#3
\end{itemize}}}}
%-----------------------------------------------------------
% 4 OPTION MCQ SEPARATED IN 2 COLS
%-----------------------------------------------------------
\newcommand{\mcqfourtwo}[9]{
\vspace{2.5mm}
\begin{raggedright}
\textbf{Question #1:} #2 \hfill \textit{#7}\\
\textit{#8}\\
#9
\begin{multicols}{2}{}
(a) #3\\
(c) #5\\
\columnbreak
(b) #4\\
(d) #6\\
\end{multicols}
\end{raggedright}}
%-----------------------------------------------------------
% 4 OPTION MCQ IN 1 COLUMN
%-----------------------------------------------------------
\newcommand{\mcqfour}[9]{
\vspace{2.5mm}
\begin{raggedright}
\textbf{Question #1:} #2 \hfill \textit{#7}\\
\textit{#8}\\
#9
(a) #3\\
(b) #4\\
(c) #5\\
(d) #6\\
\end{raggedright}}
%-----------------------------------------------------------
% DESCRIPTIVE QUESTION
%-----------------------------------------------------------
\newcommand{\question}[4]{
\vspace{1.5mm}
\begin{raggedright}
\textbf{Question #1:} #2\hfill\textit{#3}\\
\textit{#4}\\
\end{raggedright}}
%-----------------------------------------------------------
% INCLUDE IMAGE
%-----------------------------------------------------------
% Include a single image
\newcommand{\img}[5]{
\begin{figure}[h]
\centering
\includegraphics[ width = #1, height = #2]{#3}
\caption{#4}
\label{#5}
\end{figure}
}
% Include two images side by side
\newcommand{\imgtwo}[8]{
\begin{figure}[h]
\centering
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[width= #1, height = #2]{#3}
\caption{#4}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[width= #5, height = #6]{#7}
\caption{#8}
\end{subfigure}
\end{figure}
}
%-----------------------------------------------------------
% EQUATIONS
%-----------------------------------------------------------
\newcommand{\equ}[1]{
\begin{center}
$#1$
\end{center}
}
%----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- BEGIN EDITING HERE -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\begin{document}
% Details about the oraganizing institute and the exam
% \header{Instituition name}{Address}{Subject}{Exam Name}{Time}{Max. Marks}
\hdr{XYZ International School of Physics}{2547 Broadway Street, North Charleston, South Carolina 29420}{PHY0101 - ELECTRICITY}{Test Paper}{1.5 hours}{30 marks}
% Provide general exam instructions here
% \geninstructions{
% \item Instruction 1
% \item Instruction 2
% \item Instruction 3 and so on... }
\geninstructions{
\item Don't Copy
\item You can use calculators
\item Check the time in between
}
% Begin question sections here
% \questionsection{section name}{section description}{Section specific instructions. Leave blank if there aren't any}
\questionsection{A}{Answer any three of the following multiple choice questions.}{
\item Each right answer will secure you 1.5 marks.
\item There is no negative marking.}
% Below is the template of a four option mcq organized into two columns.
% \mcqfourtwo{Question number}{Question statement}
% {Option a}
% {Option b}
% [Option c]
% {Option d}
% { marks }{hints if any}{Images or equations if any}
\mcqfourtwo{1}{What is the resistance of the given carbon resistor?}
{10 k$\Omega$}
{1 k$\Omega$}
{100 $\Omega$}
{100 k$\Omega$}
{(1.5 marks)}{Hint: Use the colour code for carbon resistors.}{\img{4cm}{4cm}{Images/carb.jpg}{}{}}
% To add a single image, use (see the previous line)
% \img{Width}{height}{Image file}{Caption if any}{label}
\newpage
% Add four options one below the other
% \mcqfour{Question number}{Question statement}
% {Option a}
% {Option b}
% {Option c}
% {Option d}
% {Marks}
% {Hints if any}
% {Images or equations if any}
\mcqfour{2}{Find the equivalent resistance in both cases?}
{1 $\Omega$, 2 $\Omega$}
{2 $\Omega$, 1 $\Omega$}
{0.33 $\Omega$, 0.5 $\Omega$}
{0.5 $\Omega$, 0.33 $\Omega$}
{(1.5 marks)}
{}
{\imgtwo{4cm}{4cm}{Images/res1.jpg}{}{4cm}{4cm}{Images/res2.jpg}{}}
% Add two images side by side (demonstrated in previous line)
% \imgtwo{width of 1st img}{height of 1st img}{1st image}{caption}{width of 2nd img}{height of 2nd img}{2nd image}{caption}
\mcqfourtwo{3}{The Ohm's law is given by the following equation. What can you say about the quantity R?}
{Always Constant\newline}
{Constant at times; changes with physical conditions}
{Variable}
{Infinite}
{(1.5 marks)}
{}
{\equ{V=IR}}
% To type equations use \equ{equation}
% Please omit $$ sign while typing equations
\mcqfourtwo{4}{ In parallel combination of n cells, we obtain}
{more voltage}
{more current}
{less voltage}
{less current}
{(1.5 marks)}
{}
{}
\questionsection{B}{Write answers to the following questions in 1 or 2 sentences.}{\item Answer all questions.
\item Marks will be deducted for exceeding the prescribed word limit.}
\question{1}{State Ohm's Law.}{(1 mark)}{}
% To add descriptive questions, use the \question command
% \question{Question number}{Question statement}{Marks}{Hint}
\question{2}{What is an electric fuse?}{(1 mark)}{}
\end{document}