% !TEX encoding = UTF-8 Unicode % !TEX spellcheck = es-CL % !TeX program = pdfLaTeX % Template for the fphw class % 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 % letterpaper % letter paper size % spanish % Para usar espaƱol, recuerde agregar el paquete babel ]{fphw} % Packages added \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 of the work you are turning in \title{Homework \#1} % a simple title \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? \institute{University of Mars \\ Institute of Intergalactic Travel} % where this is going to be delivered \class{Special Relativity (Physics 301)} % for the course... \professor{Dr. Albert Einstein} % who will grade me %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Finally we can start writing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \maketitle % Put all that nicely %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section*{Question 1} \begin{problem} 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} \subsection*{Answer} % Subquestion within question} \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}