mirror of
https://git.adityakumar.xyz/fphw.git
synced 2024-11-21 19:32:52 +00:00
modified the template to be useful for LaTeXtemplates.org
This commit is contained in:
parent
d716522e20
commit
7c36bf48a0
3 changed files with 138 additions and 8 deletions
22
luftballons.pl
Normal file
22
luftballons.pl
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
for (1..99) { print $_." Luftballons\n"; }
|
||||||
|
|
||||||
|
# This is a commented line
|
||||||
|
|
||||||
|
my $string = "Hello World!";
|
||||||
|
|
||||||
|
print $string."\n\n";
|
||||||
|
|
||||||
|
$string =~ s/Hello/Goodbye Cruel/;
|
||||||
|
|
||||||
|
print $string."\n\n";
|
||||||
|
|
||||||
|
finale();
|
||||||
|
|
||||||
|
exit;
|
||||||
|
|
||||||
|
sub finale { print "Fin.\n"; }
|
BIN
swallow.jpg
Normal file
BIN
swallow.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 168 KiB |
124
template.tex
124
template.tex
|
@ -3,7 +3,11 @@
|
||||||
% !TeX program = pdfLaTeX
|
% !TeX program = pdfLaTeX
|
||||||
|
|
||||||
% Template for the fphw class
|
% Template for the fphw class
|
||||||
% By Felipe Portales Oliva (f.portales.oliva@gmail.com)
|
% Author: Felipe Portales-Oliva (f.portales.oliva@gmail.com),
|
||||||
|
% using Vel's (vel@latextemplates.com) content
|
||||||
|
% This document is licensed under:
|
||||||
|
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
|
||||||
|
|
||||||
\documentclass[12pt % 12 pt main font
|
\documentclass[12pt % 12 pt main font
|
||||||
% letterpaper % letter paper size
|
% letterpaper % letter paper size
|
||||||
% spanish % Para usar español, recuerde agregar el paquete babel
|
% spanish % Para usar español, recuerde agregar el paquete babel
|
||||||
|
@ -11,24 +15,128 @@
|
||||||
|
|
||||||
% Packages added
|
% Packages added
|
||||||
\usepackage{mathpazo} % if you want to use Palatino fonts
|
\usepackage{mathpazo} % if you want to use Palatino fonts
|
||||||
|
\usepackage[utf8]{inputenc} % Required for inputting international characters
|
||||||
|
\usepackage[T1]{fontenc} % Output font encoding for international characters
|
||||||
|
\usepackage{graphicx} % To insert images
|
||||||
|
\usepackage{booktabs} % Required for better horizontal rules in tables
|
||||||
|
\usepackage{listings} % Required for insertion of code
|
||||||
|
\usepackage{enumerate} % to change the enumerate environment
|
||||||
|
|
||||||
% Identification
|
% Identification of the work you are turning in
|
||||||
\title{Homework \#1} % a simple title
|
\title{Homework \#1} % a simple title
|
||||||
\author{Felipe Portales Oliva} % me :)
|
\author{Felipe Portales-Oliva} % me, or you, who is who?, what is reality?
|
||||||
\date{March 28th, 2019} % when this is going to be delivered/due?
|
\date{March 28th, 2019} % when this is going to be delivered/due?
|
||||||
\institute{University of Life} % where this is going to be delivered
|
\institute{University of Mars \\ Institute of Intergalactic Travel} % where this is going to be delivered
|
||||||
\class{QFT in Curved Spacetimes} % for the class...
|
\class{Special Relativity (Physics 301)} % for the course...
|
||||||
\professor{Dr. Albert Einstein} % who will grade me
|
\professor{Dr. Albert Einstein} % who will grade me
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% Finally we can start writing
|
% Finally we can start writing
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\maketitle % Put all that nicely
|
\maketitle % Put all that nicely
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
\section*{Question 1}
|
||||||
\begin{problem}
|
\begin{problem}
|
||||||
This is where you put the problem you have to solve.
|
What is the airspeed velocity of an unladen swallow?
|
||||||
|
\end{problem}
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=0.5\columnwidth]{swallow.jpg} % Example image
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
\subsection*{Answer}
|
||||||
|
|
||||||
|
While this question leaves out the crucial element of the geographic origin of the swallow, according to Jonathan Corum, an unladen European swallow maintains a cruising airspeed velocity of \textbf{11 metres per second}, or \textbf{24 miles an hour}. The velocity of the corresponding African swallows requires further research as kinematic data is severely lacking for these species.
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
\section*{Question 2}
|
||||||
|
\begin{problem}
|
||||||
|
How much wood would a woodchuck chuck if a woodchuck could chuck wood?
|
||||||
|
\begin{enumerate}[(\itshape a\normalfont)]
|
||||||
|
\item Suppose ``chuck" implies throwing.
|
||||||
|
\item Suppose ``chuck" implies vomiting.
|
||||||
|
\end{enumerate}
|
||||||
\end{problem}
|
\end{problem}
|
||||||
|
|
||||||
This is where you put your solution \newpage
|
\subsection*{Answer} % Subquestion within question}
|
||||||
This is how a second page looks
|
\begin{enumerate}[(\itshape a\normalfont)]
|
||||||
|
\item According to the Associated Press (1988), a New York Fish and Wildlife technician named Richard Thomas calculated the volume of dirt in a typical 25--30 foot (7.6--9.1 m) long woodchuck burrow and had determined that if the woodchuck had moved an equivalent volume of wood, it could move ``about \textbf{700 pounds (320 kg)} on a good day, with the wind at his back".
|
||||||
|
|
||||||
|
\item A woodchuck can ingest 361.92 cm\textsuperscript{3} (22.09 cu in) of wood per day. Assuming immediate expulsion on ingestion with a 5\% retainment rate, a woodchuck could chuck \textbf{343.82 cm\textsuperscript{3}} of wood per day.
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
\section*{Question 3}
|
||||||
|
\begin{problem}
|
||||||
|
Identify the author of Equation \ref{eq:bayes} below and briefly describe it in English.
|
||||||
|
|
||||||
|
\begin{equation}\label{eq:bayes}
|
||||||
|
P(A|B) = \frac{P(B|A)P(A)}{P(B)}
|
||||||
|
\end{equation}
|
||||||
|
\end{problem}
|
||||||
|
|
||||||
|
\subsection*{Answer}
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent porttitor arcu luctus, imperdiet urna iaculis, mattis eros. Pellentesque iaculis odio vel nisl ullamcorper, nec faucibus ipsum molestie. Sed dictum nisl non aliquet porttitor. Etiam vulputate arcu dignissim, finibus sem et, viverra nisl. Aenean luctus congue massa, ut laoreet metus ornare in. Nunc fermentum nisi imperdiet lectus tincidunt vestibulum at ac elit. Nulla mattis nisl eu malesuada suscipit.
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
\section*{Question 4 (bonus points)}
|
||||||
|
\begin{problem}
|
||||||
|
The table below shows the nutritional consistencies of two sausage types. Explain their relative differences given what you know about daily adult nutritional recommendations.
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\begin{tabular}{l l l}
|
||||||
|
\toprule
|
||||||
|
\textit{Per 50g} & Pork & Soy \\
|
||||||
|
\midrule
|
||||||
|
Energy & 760kJ & 538kJ\\
|
||||||
|
Protein & 7.0g & 9.3g\\
|
||||||
|
Carbohydrate & 0.0g & 4.9g\\
|
||||||
|
Fat & 16.8g & 9.1g\\
|
||||||
|
Sodium & 0.4g & 0.4g\\
|
||||||
|
Fibre & 0.0g & 1.4g\\
|
||||||
|
\bottomrule
|
||||||
|
\end{tabular}
|
||||||
|
\end{center}
|
||||||
|
\end{problem}
|
||||||
|
|
||||||
|
\subsection*{Answer}
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent porttitor arcu luctus, imperdiet urna iaculis, mattis eros. Pellentesque iaculis odio vel nisl ullamcorper, nec faucibus ipsum molestie. Sed dictum nisl non aliquet porttitor. Etiam vulputate arcu dignissim, finibus sem et, viverra nisl. Aenean luctus congue massa, ut laoreet metus ornare in. Nunc fermentum nisi imperdiet lectus tincidunt vestibulum at ac elit. Nulla mattis nisl eu malesuada suscipit.
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
\section*{Question 5 (bonus points)}
|
||||||
|
\begin{problem}
|
||||||
|
\lstinputlisting[
|
||||||
|
caption=Luftballons Perl Script, % Caption above the listing
|
||||||
|
label=lst:luftballons, % Label for referencing this listing
|
||||||
|
language=Perl, % Use Perl functions/syntax highlighting
|
||||||
|
frame=single, % Frame around the code listing
|
||||||
|
showstringspaces=false, % Don't put marks in string spaces
|
||||||
|
numbers=left, % Line numbers on left
|
||||||
|
numberstyle=\tiny, % Line numbers styling
|
||||||
|
]{luftballons.pl}
|
||||||
|
\begin{enumerate}[(\itshape a\normalfont)]
|
||||||
|
\item How many luftballons will be output by the Listing \ref{lst:luftballons} above?
|
||||||
|
\item Identify the regular expression in Listing \ref{lst:luftballons} and explain how it relates to the anti-war sentiments found in the rest of the script.
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\end{problem}
|
||||||
|
|
||||||
|
\subsection*{Answer}
|
||||||
|
|
||||||
|
\begin{enumerate}[(\itshape a\normalfont)]
|
||||||
|
\item 99 luftballons.
|
||||||
|
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent porttitor arcu luctus, imperdiet urna iaculis, mattis eros. Pellentesque iaculis odio vel nisl ullamcorper, nec faucibus ipsum molestie. Sed dictum nisl non aliquet porttitor. Etiam vulputate arcu dignissim, finibus sem et, viverra nisl. Aenean luctus congue massa, ut laoreet metus ornare in. Nunc fermentum nisi imperdiet lectus tincidunt vestibulum at ac elit. Nulla mattis nisl eu malesuada suscipit.
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
Loading…
Reference in a new issue