Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

Commit

Permalink
update exercises
Browse files Browse the repository at this point in the history
  • Loading branch information
miekg committed Jul 22, 2012
1 parent f37b9eb commit 4e71fae
Show file tree
Hide file tree
Showing 27 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion ex-basics/ex-average-no-func.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Average},difficulty=4]
\begin{Exercise}[title={Average},difficulty=1]
\label{ex:average no func}
\Question\label{ex:average no func q1} Give the code
that calculates the average of a \type{float64} slice. In
Expand Down
2 changes: 1 addition & 1 deletion ex-basics/ex-fizzbuzz.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={FizzBuzz},difficulty=1]
\begin{Exercise}[title={FizzBuzz},difficulty=0]
\label{ex:fizzbuzz}
\Question \label{ex:fizzbuzz q1} Solve this problem, called
the Fizz-Buzz \cite{fizzbuzz} problem:
Expand Down
2 changes: 1 addition & 1 deletion ex-basics/ex-for.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={For-loop},difficulty=1]
\begin{Exercise}[title={For-loop},difficulty=0]
\label{ex:for-loop}
\Question \label{ex:for-loop q1} Create a simple loop with the \key{for} construct. Make it loop
10 times and print out the loop counter with the \package{fmt} package.
Expand Down
2 changes: 1 addition & 1 deletion ex-beyond/ex-cat.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Cat},difficulty=6]
\begin{Exercise}[title={Cat},difficulty=1]
\label{ex:cat}
\Question \label{ex:cat q1} Write a program which mimics the Unix program
\prog{cat}. For those who don't know this program, the following
Expand Down
2 changes: 1 addition & 1 deletion ex-beyond/ex-double-linked-list.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Linked List},difficulty=6]
\begin{Exercise}[title={Linked List},difficulty=1]
\label{ex:linkedlist}
\Question
\label{ex:linkedlist q1}
Expand Down
2 changes: 1 addition & 1 deletion ex-beyond/ex-map.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Map function with interfaces},difficulty=6]
\begin{Exercise}[title={Map function with interfaces},difficulty=2]
\label{ex:map function interfaces}
\Question
Use the answer from exercise Q\ref{ex:map function}, but now
Expand Down
2 changes: 1 addition & 1 deletion ex-beyond/ex-pointer-arith.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Pointer arithmetic},difficulty=4]
\begin{Exercise}[title={Pointer arithmetic},difficulty=1]
\label{ex:pointer arithmetic}
\Question
In the main text on page \pageref{main:pointer arithmetic}
Expand Down
2 changes: 1 addition & 1 deletion ex-beyond/ex-pointers-method.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Method calls},difficulty=8]
\begin{Exercise}[title={Method calls},difficulty=2]
\label{ex:methodcalls}
\Question \label{ex:methodcalls q1} Suppose we have the following
program. Note the package \package{container/vector} was once part
Expand Down
2 changes: 1 addition & 1 deletion ex-beyond/ex-pointers.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Pointers},difficulty=6]
\begin{Exercise}[title={Pointers},difficulty=1]
\label{ex:pointers}

\Question
Expand Down
2 changes: 1 addition & 1 deletion ex-channels/ex-fib.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Fibonacci II},difficulty=7]
\begin{Exercise}[title={Fibonacci II},difficulty=2]
\label{ex:fibonaci II}
\Question\label{ex:fibonaci II q1}
This is the same exercise as the one given page \pageref{ex:fibonaci}
Expand Down
2 changes: 1 addition & 1 deletion ex-channels/ex-for-channels.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Channels},difficulty=4]
\begin{Exercise}[title={Channels},difficulty=1]
\label{ex:channels}
\Question\label{ex:channels q1} Modify the program you created in
exercise Q\ref{ex:for-loop}
Expand Down
2 changes: 1 addition & 1 deletion ex-functions/ex-average.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Average},difficulty=4]
\begin{Exercise}[title={Average},difficulty=0]
\label{ex:average}
\Question\label{ex:average q1} Write a function that calculates
the average of a \type{float64} slice.
Expand Down
2 changes: 1 addition & 1 deletion ex-functions/ex-bubblesort.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Bubble sort},difficulty=5]
\begin{Exercise}[title={Bubble sort},difficulty=1]
\label{ex:bubble}
\Question\label{ex:bubble q1} Write a function that performs
Bubble sort on slice of ints. From \cite{bubblesort}:
Expand Down
2 changes: 1 addition & 1 deletion ex-functions/ex-fib.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Fibonacci},difficulty=5]
\begin{Exercise}[title={Fibonacci},difficulty=1]
\label{ex:fibonaci}
\Question\label{ex:fibonaci q1}
The Fibonacci sequence starts as follows: $1, 1, 2, 3, 5, 8, 13, \ldots$
Expand Down
2 changes: 1 addition & 1 deletion ex-functions/ex-for.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={For-loop II},difficulty=1]
\begin{Exercise}[title={For-loop II},difficulty=0]
\label{ex:for-loop II}
\Question Remember Q\ref{ex:for-loop} (see page \pageref{ex;for-loop}?
We extend this a little and now ask you to put the body of the for loop
Expand Down
2 changes: 1 addition & 1 deletion ex-functions/ex-funcfunc.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Functions that return functions},difficulty=6]
\begin{Exercise}[title={Functions that return functions},difficulty=1]
\label{ex:function}
\Question\label{ex:function q1} Write a function that returns a function
that performs a $+2$ on integers. Name the function \func{plusTwo}.
Expand Down
2 changes: 1 addition & 1 deletion ex-functions/ex-map.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Map function},difficulty=4]
\begin{Exercise}[title={Map function},difficulty=1]
\label{ex:map function}
A \func{map()}-function is a function that takes
a function and a list. The function is applied to
Expand Down
2 changes: 1 addition & 1 deletion ex-functions/ex-minmax.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Minimum and maximum},difficulty=3]
\begin{Exercise}[title={Minimum and maximum},difficulty=0]
\label{ex:minmax}
\Question\label{ex:minmax q1} Write a function that calculates the
maximum value in an \type{int} slice (\type{[]int}).
Expand Down
2 changes: 1 addition & 1 deletion ex-functions/ex-order.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Integer ordering},difficulty=3]
\begin{Exercise}[title={Integer ordering},difficulty=0]
\label{ex:ordering function}
\Question Write a function that returns its (two) parameters in the right,
numerical (ascending) order:\newline
Expand Down
2 changes: 1 addition & 1 deletion ex-functions/ex-scope.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Scope},difficulty=4]
\begin{Exercise}[title={Scope},difficulty=1]
\label{ex:scope}
\Question\label{ex:scope q1} What is wrong with the following program?

Expand Down
2 changes: 1 addition & 1 deletion ex-functions/ex-stack.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Stack},difficulty=5]
\begin{Exercise}[title={Stack},difficulty=1]
\label{ex:stack}
\Question \label{ex:stack q1} Create a simple stack which can hold a
fixed amount of ints. It does not have to grow beyond this limit.
Expand Down
2 changes: 1 addition & 1 deletion ex-functions/ex-vararg.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Var args},difficulty=5]
\begin{Exercise}[title={Var args},difficulty=1]
\label{ex:varargs}
\Question\label{ex:varargs q1}
Write a function that takes a variable numbers of ints and prints
Expand Down
2 changes: 1 addition & 1 deletion ex-interfaces/ex-interfaces.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Interfaces and compilation},difficulty=6]
\begin{Exercise}[title={Interfaces and compilation},difficulty=1]
\Question
The code in listing \ref{src:interface fail} on page
\pageref{src:interface fail} compiles OK --- as stated
Expand Down
2 changes: 1 addition & 1 deletion ex-interfaces/ex-minmax.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Interfaces and max()},difficulty=7]
\begin{Exercise}[title={Interfaces and max()},difficulty=2]
\Question
In exercise Q\ref{ex:minmax} we created a max function that works on
a slice of integers.
Expand Down
2 changes: 1 addition & 1 deletion ex-interfaces/ex-pointers-and-reflect.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Pointers and reflection},difficulty=5]
\begin{Exercise}[title={Pointers and reflection},difficulty=1]
\label{ex:pointers and reflection}
\Question
One of the last paragraphs in section ``\titleref{sec:introspection and reflection}''
Expand Down
2 changes: 1 addition & 1 deletion ex-packages/ex-calc.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Calculator},difficulty=7]
\begin{Exercise}[title={Calculator},difficulty=2]
\label{ex:calc}
\Question\label{ex:calc q1} Create a reverse polish calculator. Use your
stack package.
Expand Down
2 changes: 1 addition & 1 deletion ex-packages/ex-stack-package.tex
@@ -1,4 +1,4 @@
\begin{Exercise}[title={Stack as package},difficulty=2]
\begin{Exercise}[title={Stack as package},difficulty=0]
\label{ex:stack-package}
\Question\label{ex:stack-package q1}
See the Q\ref{ex:stack} exercise. In this exercise we want to create
Expand Down

0 comments on commit 4e71fae

Please sign in to comment.