# Commits

committed 67eef0d

easiest-quiz-ever.tex: As presented at EuroPython 2010.

• Participants
• Parent commits 87a9a31

# File tex/easiest-quiz-ever.tex

+\documentclass{beamer}
+
+\usepackage{pgfpages}
+\usepackage{rotating}
+%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
+
+\usepackage{graphicx}
+%\usetheme{Madrid}
+
+
+
+\def\resourceframe{%
+  \begin{frame}
+    \frametitle{Explanations and information}
+
+    See JavaScript on the conference wiki, which is probably
+
+    \bigskip
+    http://wiki.europython.eu/JavaScript.
+  \end{frame}
+}
+
+\title{The easiest quiz in the world \\ ever}
+\author{Jonathan Fine, Open University, UK}
+\date[]{EuroPython Lightning talk, 2010\\
+
+}
+
+\begin{document}
+
+\begin{frame}
+\maketitle
+\end{frame}
+
+\begin{frame}
+\frametitle{Question 1: Panama hats}
+
+Q:  In which country were Panama hats originally made?
+
+\bigskip
+\bigskip
+\bigskip
+\pause
+A: Ecuador.
+
+\bigskip
+Panama was a city in Ecuador before the creation of the Panama Canal
+Zone and then the country Panama.
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Question 2: Equality is transitive}
+
+Command line SpiderMonkey JavaScript interpreter:
+
+\begin{verbatim}
+easiest-quiz-ever\$ js
+js> a = '0'
+js> b = 0
+js> c = ''
+
+js> a == b
+true
+js> b == c
+true
+js> a == c      // Question.
+\end{verbatim}
+
+\bigskip
+\pause
+\begin{verbatim}
+js> a == c
+false
+\end{verbatim}
+
+\end{frame}
+
+\resourceframe
+
+\begin{frame}
+\frametitle{Question 3: Canary Islands}
+
+Q:  After which creature were the Canary Islands named?
+
+\bigskip
+\bigskip
+\bigskip
+\pause
+
+A: Dog (canine).
+
+\bigskip
+As I recall, there were many dog seals on one the
+Canary Islands.
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Question 4:  Assignment assigns}
+
+\begin{verbatim}
+js> words = 'Call me Ishmael.'
+Call me Ishmael.
+js> words.lang = 'en'
+js> lang = words.lang       // What is lang?
+\end{verbatim}
+
+\bigskip
+\pause
+\begin{verbatim}
+js> lang == undefined
+true
+\end{verbatim}
+
+\pause
+\begin{verbatim}
+js> lang = words.lang = 'en'  // What is lang?
+\end{verbatim}
+
+\pause
+\begin{verbatim}
+js> lang
+en
+\end{verbatim}
+
+\end{frame}
+
+\begin{frame}
+\frametitle{Question 5: King George}
+
+Q:  What was the first name of Britain's King George VI?
+
+\bigskip
+\bigskip
+\bigskip
+\pause
+
+A: Albert.
+
+\bigskip
+He had several names, and Queen Victoria said she wanted
+her beloved Albert to be the only English monarch of that name.
+
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Question 6: Dot binds}
+
+\begin{verbatim}
+js> a = [0, 1, 2]
+0,1,2
+js> a.push(3); a.push(4);
+js> a
+0,1,2,3,4
+\end{verbatim}
+
+\pause
+\begin{verbatim}
+js> b = [0, 1, 2]
+js> tmp = b.push
+js> tmp(3); tmp(4);   // What is 'b'?
+\end{verbatim}
+
+\pause
+\begin{verbatim}
+js> b
+0,1,2
+\end{verbatim}
+
+\pause
+\begin{verbatim}
+js> [length, this[0], this[1]]
+2,3,4
+\end{verbatim}
+\end{frame}
+
+\begin{frame}
+\frametitle{Question 7: White rhinocerous}
+
+Q:  What is the colour of a white rhinocerous?
+
+\bigskip
+\bigskip
+\bigskip
+\pause
+A:  Grey.
+
+\bigskip
+The name is a corruption of the Dutch work for wide'.
+\end{frame}
+
+
+\begin{frame}[fragile]
+\frametitle{Question 8: False is false}
+
+\begin{verbatim}
+js> true ? 1 : 0
+1
+js> false ? 1 : 0
+0
+\end{verbatim}
+
+\bigskip
+\pause
+\begin{verbatim}
+js> new Boolean(false) ? 1 : 0  // Question
+\end{verbatim}
+\pause
+\begin{verbatim}
+1
+\end{verbatim}
+
+\bigskip
+\pause
+\begin{verbatim}
+js> Boolean(false) ? 1 : 0
+\end{verbatim}
+\pause
+\begin{verbatim}
+0
+\end{verbatim}
+\end{frame}
+
+\resourceframe
+
+\begin{frame}
+\frametitle{Question 9: Black box}
+
+Q:  What colour is the black box flight recorder carried by commercial planes?
+
+\bigskip
+\bigskip
+\bigskip
+\pause
+A:  Orange.
+
+\bigskip
+
+This makes it more visible.
+\end{frame}
+
+\begin{frame}
+\frametitle{Question 10: Like JavaScript}
+
+Q: JavaScript is not like which programming language \ldots
+
+\pause 
+\bigskip
+\ldots created by Sun?
+
+\bigskip
+\bigskip
+\bigskip
+\pause
+A:  Java.
+\end{frame}
+
+
+\begin{frame}
+\frametitle{Thank you}
+
+\bigskip
+
+Don't forget JavaScript on the conference wiki for more
+information.
+
+\end{frame}
+
+\end{document}`