USFP INFORMATION TECHNOLOGY B
(Programming)
Programming Fundamentals with Python and Java
SAMPLE Final Examination
Winter Semester, 2017
Date of Notification: Monday 30 October 2017
Date: Exam period 16/11/2017 -1/12/2017
Weighting: 20% of the course assessment
Task Duration: 2.0 hours plus 10 minutes reading time
Task Description: The examination comprises two parts.
Part A : 10 multiple choice questions. Each question is worth one mark each. Answer all
questions on the paper provided.
Part B: 4 long Answer questions. Answer all questions in the space provided. Part B is worth
20 marks in total.
Total Marks: 30 marks
Instructions to Students:
• Answer all Part A multiple choice questions online
• AllPart B questions are to be answered in the examination booklet provided.
• Calculators are NOT allowed.
• This section of the ITB examination accounts for approximately 20% of this subject's
assessment.
1|Page Taylors College USFP Semester 2, 2017
, Part A. Multiple Choice Questions (12 Marks)
Mark your choice of correct answer wither by indicating with a tick ( ) on the marksheet supplied
QUESTION 1.
What is the output of the Python command :
>>>type(5!=3)
A. <type 'str'>
B. <type 'bool'>
C. <type 'float'>
D. <type 'int'>
QUESTION 2.
What does the following Python function do?
>>>def detector(signal, reference):
if signal >= reference:
return 1
elif signal < reference:
return 0
A. The function compares two values and digitizes the output as either 1 or 0
depending on whether the signal is greater than or equal to, or less than a reference
value
B. The function writes the signal value to a reference value and prints 1,
otherwise writes the reference value to the signal value and prints 0
C. The function does nothing because ‘signal’ and ‘reference’ variables are
not defined
D. Thefunction does nothing because the function has incorrect syntax
2|Page Taylors College USFP Semester 2, 2017