fin120.html - Last updated: Thursday 2nd April 2020, 9:16 PT, AD

CSCI120 - Final Exam


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



This document is subject to change.  

REFRESH THIS PAGE OFTEN FOR LATEST VERSION



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


In accordance with college regulations, 
students with less than 50% attendance on the course
may not be allowed to take the final exam.

CLICK HERE FOR FINAL ORAL EXAM INSTRUCTIONS

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 the Gradebook or sent by email.
Your final grades are posted on the Student Portal. 

******************************************************************************************************
Before your exams, please read the exam regulations which are posted on the Student Portal.
******************************************************************************************************





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

The very latest final exam revision topics are shown on C4 in Week 14. 

***   The final exam (40%) is made up of a final assignment and an oral exam at the posted final exam time.   ***


The final assignment is an individual assignment worth 30% of the final grade.

The final oral exam is worth 10% of the final grade.


*****     STUDENT PHOTO ID MUST BE DISPLAYED DURING ORAL EXAMS     ***** 


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).


In the oral exam 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.



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

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']



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

f = open("x.txt","w") 
f.write("Where did\nI put my\nloaf\nof bread") 
f.close() 
f = open("x.txt","r") 
string = f.readline()
string = f.readline()
str1 = string.strip()
print(str1)
string = f.readline()
str2 = string.strip()
print(str2)
f.read(4)
string = f.readline()
str3 = string.strip()
print(str3)
print(str2.upper())
print(len(str1))


Answer:

I put my
loaf
read
LOAF
8

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

The Participation score is worth a total of 10% of the final grade,
and is based on your participation in the course.
Participation is measured by attendance, student activity on the C4 system, 
submission of assignments and quality of submissions.

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



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 the Gradebook or sent by email.
Your final grades are posted on the Student Portal.


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

Good luck in this exam and all your other exams at Coquitlam College!

Keep washing your hands and stay healthy!

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

End of document

 


		

Valid HTML5! Valid CSS!