fin120.html, last updated: Friday 19th August 2016, 8:02 PT, AD

CSCI120 - Final Exam


/*********************************************************************/



This document is subject to change.  

REFRESH THIS PAGE OFTEN FOR LATEST VERSION



/*********************************************************************/


In accordance with college regulations, 
no final grades are posted online in Gradebook or by email.
Your final grades are mailed out from the college office.


Final exam revision topics are posted on the final exam study guide.

The final exam is a 3 hour written exam.
The final exam is closed-book and closed-notes.

The final exam is worth 35% of the final grade. 



Students must attain an overall passing grade on
the weighted average of exams in the course 
in order to obtain a clear pass (C or better).


You may be asked questions on any of the topics covered
in the course.

Students may be tested in a quiz or an exam
on the content of team or individual assignments.


The final exam will be composed of a mix of questions:

Part 1 (20%) of the exam is composed of:

20 multiple choice or true/false questions worth 1% each.

Part 2 (20%) of the exam is composed of:

5 predict the output of programs questions worth 20% in total.

Part 3 (30%) of the exam is composed of:

three written questions worth 10% each. 

Part 4 (30%) of the exam is composed of:

three programming questions worth 10% each. 



----------------------------------------------------------------------------

Example predict the output questions:






1.  What is the output of this Python program?

x = 17 / 2 % 2 * 3**3
print (x)
 

Answer:

13.5





 
2.  What is the output of this Python program?

print (7 > 10)
print (4 < 16) 
print (4 == 4) 
print (4 <= 4)  
print (4 != 4)  



Answer: 

False
True
True
True
False


 

3.  What is the output of this Python program?


num1 = 5
if num1 >= 91:
    num2 = 3
else:
    if num1 < 6:
        num2 = 4
    else:
        num2 = 2
x = num2 * num1 + 1
print (x,x%7)



Answer: 
21     0







4. Name and give an example of the three types of error
that might be contained in a Python program.

Answer:

syntax error - mis-spelling a keyword
logic error - multiplying when you meant to divide
run-time - an attempt to divide by zero




5. What is an algorithm?


Answer: a written description of the steps to solve a problem.



6. What is a computer program?

Answer: the implementation of an algorithm



7. What is the data type of a value such as 3.142?

Answer: float



8. What is the data type of a value such as 3?

Answer: int



9. What is the data type of a value such as "anne was here"?

Answer: string



10.  What is the output when the following code is executed?

list1 = [2,4,6,8,10,12,14,16,18,20] 
print (list1[0:1],list1[5:7])

Answer:
[2] [12, 14]








11.  What is the output when the following code is executed?

list1 = [1,2,3]
list1 = list1 * 2
print (list1)

Answer:
[1, 2, 3, 1, 2, 3]







12.  What is the output when the following code is executed?

s1 = 'spamandeggs'
x = s1.find('and')
print (x)
print (s1[0:1],s1[5:7])

Answer:
4 
s nd








13.  What is the output when the following code is executed?

s = 'one\ntwo\tthree'
print (s)
print (len(s))

Answer:
one
two	three 
13







14.  What is the output when the following code is executed?

list2 = ["B","C","A"]
list2.extend(["X","Y"]) 
list2.reverse()
list2.append("S")
list2.sort() 
list2.reverse()
print (list2)

Answer:
['Y', 'X', 'S', 'C', 'B', 'A']



-----------------------------------------------------------------------------

The second Participation score is worth a total of 5% of the final grade,
and is based on your participation in the course for the second half of the semester.
Participation is measured by student activity on the C4 system and submission of assignments.

-----------------------------------------------------------------------------


GPA
===
Your participation and progress are monitored throughout the course.

You may inspect your status report at any time using the online Gradebook

Final exam dates are posted on the Coquitlam College website.

In accordance with college regulations, 
no final grades are posted online in Gradebook or by email.
Your final grades are mailed out from the college office.


/************************************************************/
Good Luck!
AHD
/************************************************************/
 

End of document

 

 



























		

Valid XHTML 1.0! Valid CSS!