The University of Auckland: Second Semester, 2014 Campus: City
The University of Auckland: Second Semester, 2014 Campus: City
COMPUTER SCIENCE
NOTE:
You must answer all questions in this exam.
No calculators are permitted
Answer Section A (Multiple choice questions) on the Teleform answer sheet provided.
Answer Section B in the space provided in this booklet.
There is space at the back for answers that overflow the allotted space.
Surname
0B
Forenames
1B
Student ID
2B
Sample Solutions
3B
Login (UPI)
4B
1 - 25 Multiple Choice 50
27 Spreadsheets 10
28 Databases 10
29 LaTeX 10
TOTAL 100
CONTINUED
VERSION 00000001 -2- COMPSCI 111/111G
SECTION A
Question 1
[2 marks] Which binary number equals the decimal number 99?
(a) 1111111
(b) 111
(c) 1100011
(d) 1010011
(e) None of the above
Question 2
[2 marks] Which of the following lists is in increasing order of magnitude?
Question 3
[2 marks] Which one of the following statements is FALSE?
(a) Hard drives hold more information than RAM, and can access the information
faster than RAM.
(b) Blu-ray discs have a larger storage capacity than DVDs.
(c) Multiple hard drives can be connected together in a RAID to improve the speed of
information transfer.
(d) RAM is more expensive per MB than hard disk capacity.
(e) The information in a hard drive remains when the power is switched off.
CONTINUED
VERSION 00000001 -3- COMPSCI 111/111G
Question 4
[2 marks] Which one of the following statements is FALSE?
Question 5
[2 marks] Which one of the following is classified as system software?
Question 6
[2 marks] Which of the following is the main purpose of file extensions?
CONTINUED
VERSION 00000001 -4- COMPSCI 111/111G
Question 7
[2 marks] What is the main purpose of protocols used on the Internet?
Question 8
[2 marks] Which of the following is NOT needed for home broadband access including
Wifi?
Question 9
[2 marks] Which of the following best describes the transfer of an email when both sender
and recipient use a mail client?
(a) Message sent to mail server via SMTP, mail server contacts DNS server, message
sent over the Internet using TCP, recipient collects mail from recipient mail
server using IMAP or POP3.
(b) Message sent to mail server via SMTP, mail server contacts spam checker, spam
checker accepts message, mail server sends message to recipient's local computer.
(c) Message sent to mail server via IMAP, mail server contacts DNS server, message sent
over the Internet using TCP, message copied from recipient mail server to recipient's
local computer using SMTP.
(d) Message sent to mail server via SMTP, mail server contacts DNS server, DNS server
contacts recipient mail server, recipient's local computer downloads message using
POP3.
(e) Email sent via secure HTTP to ISP's web server, web server sends message using
TCP to recipient ISP web server, recipient reads message using IMAP.
CONTINUED
VERSION 00000001 -5- COMPSCI 111/111G
Question 10
[2 marks] Which of the following statements is FALSE?
(a) The conversation view of messages on Gmail is useful to keep track of answers to a
message.
(b) Netiquette is a set of rules that define polite online behaviour.
(c) In most countries companies cannot legally read their employees’ email.
(d) The Bcc field can be used to allow a person other than the main recipient to see the
message.
(e) SMTP is used to send messages, IMAP is used to receive messages.
Question 11
[2 marks] Which of the following modes of communication is synchronous?
Question 12
[2 marks] Who developed the first wiki?
CONTINUED
VERSION 00000001 -6- COMPSCI 111/111G
Question 13
[2 marks] Which of the following statements about the PageRank algorithm is FALSE?
(a) PageRank was not used by the Alta Vista search engine.
(b) Pages with a high PageRank value are put higher up in the results of a Google search.
(c) PageRank associates a number with a page that represents the likelihood that a person
randomly clicking on links will arrive at that page.
(d) PageRank was developed in 1996 at Stanford by the people who later founded
Google.
(e) PageRank provides a number measuring the quality of a web page.
Question 14
[2 marks] Which of the following statements is TRUE?
(a) RefWorks allows users to create an account and develop their own database of
references.
(b) LaTeX is easier to use than MS Word for producing text documents.
(c) MS Word does not allow hyperlinks to be added to the text.
(d) MS Word 2003 used ribbons.
(e) MS Word was developed by Donald Knuth.
Question 15
[2 marks] Which of the following was NOT developed at Xerox PARC?
Question 16
[2 marks] Which of the following computers was the first commercially available personal
computer?
CONTINUED
VERSION 00000001 -7- COMPSCI 111/111G
Question 17
[2 marks] What historical event led to the production of the electronic digital computers
Colossus and ENIAC?
Question 18
[2 marks] Which of the following statements concerning presentation design is TRUE?
(a) Writing text in the form of paragraphs rather than bullet point lists is recommended.
(b) Using the same background consistently throughout a presentation is
recommended.
(c) A ‘Conclusion’ slide is usually unnecessary and should not be used.
(d) Each slide should contain material for at least 10 minutes of talking.
(e) Reading points verbatim to the audience makes it easy for them to follow and is the
recommended way of presenting.
Question 19
[2 marks] Which of the following statements concerning PowerPoint is FALSE?
CONTINUED
VERSION 00000001 -8- COMPSCI 111/111G
Question 20
[2 marks] How many bytes are required to store an image that is 100 pixels wide, 40 pixels
high, and uses 16 colours?
Question 21
[2 marks] Which one of the following statements about image compression algorithms is
FALSE?
Question 22
[2 marks] Which of the following is NOT a form of complex reasoning studied by artificial
intelligence?
(a) Abduction.
(b) Analogy.
(c) Subduction.
(d) Deduction.
(e) None of the above.
Question 23
[2 marks] Which of the following is NOT a characteristic of rule-based methods used in
artificial intelligence?
CONTINUED
VERSION 00000001 -9- COMPSCI 111/111G
Question 24
[2 marks] Which of the following is NOT a key idea in thinking about intelligence in terms
of searching through a problem space?
Question 25
[2 marks] Which of the following is NOT a likely development in the future of computing?
CONTINUED
VERSION 00000001 - 10 - COMPSCI 111/111G
Question/Answer Sheet ID ……….…………
SECTION B
Answer all questions in this section in the space provided. If you run out of space, please use
the Overflow Sheet and indicate in the allotted space that you have used the Overflow Sheet.
(a) Write a Python program that prompts the user to enter an integer greater than one.
If the user enters a number that is not greater than one, the program should print out
the message “You did not enter an integer greater than one”.
Otherwise the program should calculate and print out the value that is the sum of the
cubes of all numbers from 1 up to (and including) the number entered by the user.
The following two examples show the exact formatting expected for prompts and
output. Given the input shown below, your program must produce the same output.
Example 1:
Enter an integer greater than one: -2
You did not enter an integer greater than one
Example 2:
Enter an integer greater than one: 2
The answer is 9
if number <= 1:
print("You did not enter an integer greater than one")
else:
total = 0
n = 1
while n <= number:
total = total + n ** 3
n = n + 1
print("The answer is", total)
(4 marks)
VERSION 00000001 - 12 - COMPSCI 111/111G
21
17
13
9
(3 marks)
(c) On the following page, draw the output produced by the turtle in the Python program
given below. Assume that the turtle begins in the middle of the window, facing right,
and that the window is approximately 800 steps wide.
import turtle
turtle.backward(50)
n = 6
angle = 360/(n - 1)
count = 0
while count < (n - 1):
turtle.forward(100)
turtle.left(angle)
count = count + 1
VERSION 00000001 - 13 - COMPSCI 111/111G
(3 marks)
VERSION 00000001 - 14 - COMPSCI 111/111G
The following spreadsheet calculates the classification for 6 earthquakes whose magnitude
has been measured using the Richter scale. The “Building Damage” column contains the
word “Yes” if the magnitude of the earthquake is 5 or more on the Richter scale, and “No”
otherwise.
(a) Cell D8 calculates the mean magnitude of all the earthquakes recorded in this
spreadsheet. What is the best formula to use in cell D8?
=AVERAGE(D2:D7)
(2 marks)
(b) What is the best formula to use in cell E2? Your answer must use an IF function and
must be able to be filled down from E2 to E7 correctly.
(3 marks)
VERSION 00000001 - 15 - COMPSCI 111/111G
(c) What is the best formula to use in cell F2? Your answer should use the vlookup
function to retrieve the appropriate Classification from the Magnitude/Classification
Table in cells H2:I8. The vlookup function has the following syntax:
vlookup(lookup_value, table_array, col_index_num,[range_lookup])
(5 marks)
VERSION 00000001 - 16 - COMPSCI 111/111G
Use the following Microsoft Access relationship diagram to answer the questions in this
section. Note that the primary key of each table uses the AutoNumber type to ensure
uniqueness.
(a) State the name of any foreign keys in the Albums table, along with their related
table(s).
(b) What is the appropriate data type for the ReleaseYear field in the Albums table?
Number
(1 mark)
VERSION 00000001 - 17 - COMPSCI 111/111G
(c) Complete the Query By Example (QBE) form below so that it generates a query that
displays the Album Name of every album that was released after the year 1980, as
well as the First Name and Surname of the artist, and the Label Name of the record
company. Some example results might be:
(4 marks)
(d) Write an SQL query that displays the First Name and Surname of every Artist with
an Age older than 25. The results should be sorted in ascending order based on the
artist’s Surname. Some example results from the query might be:
FROM Artist
ORDER BY Surname;
(4 marks)
VERSION 00000001 - 18 - COMPSCI 111/111G
Write the LaTeX code that will produce the following output:
The following LaTeX commands have been included as a reference. You will not need to
use all of these commands. Note that the basic document structure has been completed for
you.
Normal commands Environments Math mode commands
\emph{} itemize $
\section{} enumerate \sqrt{}
\subsection{} verbatim \geq
\subsubsection{} flushright \frac{}{}
\ldots center \left(
\textbf{} quote \right)
\title{} displaymath \pi
\author{} equation \sum_{}^{}
\date{} quotation \ldots
\maketitle
\item ^
_
VERSION 00000001 - 19 - COMPSCI 111/111G
\documentclass[a4paper]{article}
\begin{document}
\title{Pi}
\author{W. Iki}
\date{Semester 2 2014}
\maketitle
\section{Introduction}
\subsection{Infinite Series}
\begin{displaymath}
\frac{2}{\pi} = \frac{\sqrt{2}}{2} *
\frac{\sqrt{2+\sqrt{2}}}{2}\ldots
\end{displaymath}
\end{document}
(10 marks)
VERSION 00000001 - 20 - COMPSCI 111/111G
Complete the XHTML code below so that it produces the output shown above.
You must use the styles defined in the internal style sheet in the head section below, and
must not define any new styles.
Note: 1) The url for the Wikipedia webpage for horror films is:
http://en.wikipedia.org/wiki/Horror_film
2) The table has a 1 pixel border.
<head>
<title>Horror Films</title>
<style type="text/css">
h1, h2 {
background-color: gray;
color: white;
text-align: center;
font-family: cursive;
}
VERSION 00000001 - 21 - COMPSCI 111/111G
#tableheader {
font-size: large;
font-weight: bold;
text-align: center;
}
</style>
</head>
<body>
<h1>Horror Films</h1>
<p>
Horror films entertain viewers by playing on their
primal fears. For more information on horror films
click
<a href =
"http://en.wikipedia.org/wiki/Horror_film">here</a>.
</p>
(3 marks)
<!-- Favourite Directors -->
<h2>Favourite Directors</h2>
<dl>
<dt class="directors">Ti West</dt>
<dd class="films">The Innkeepers</dd>
<dt class="directors">Adam Wingard</dt>
<dd class="films">You're Next</dd>
</dl>
(4 marks)
VERSION 00000001 - 22 - COMPSCI 111/111G
<h2>Movie Night</h2>
<table border="1px">
<tr id="tableheader">
<td>Movie</td>
<td>Time</td>
</tr>
<tr>
<td class="films">A Nightmare On Elm Street</td>
<td>22:00 - 0:00</td>
</tr>
</table>
(3 marks)
</body>
</html>