CSCI110 - Final Exam Study Guide

 
Last updated: Friday 2nd April 2010, 11:14 PT, AD
 
REFRESH THIS PAGE OFTEN FOR LATEST VERSION
 
Final Exam format 

These are the chapters to be studied for the final exam:


Chapter 5 - Decisions: Section 5.1 Relational and Logical Operators, Section 5.2 If Blocks
Chapter 6 - Repetition: Section 6.1 Do Loops, Section 6.2 Processing Lists of Data with Do Loops, Section 6.3 For...Next Loops
Chapter 7 - Arrays: Section 7.1 Creating and Accessing Arrays, Section 7.2 Using Arrays
Chapter 8 - Sequential Files: Section 8.1 Sequential Files, Section 8.2 Using Sequential Files

 
 
Review past quiz questions from the relevant chapters 
for examples of question style and content.


Example written and programming final exam questions:
 
 
 
 
 
 
1. Variables declared within a loop structure have local scope. 
Explain this sentence.

 
 
Answer:
The scope of a variable is where it can be used in the program.
Global scope means it can be used anywhere in the program, 
local scope means that the variable can be used only 
in the block of code where it is declared. For example, 
a variable declared inside a loop structure can only be used
within the confines of the loop structure.
 
 
 
 
2. Why do programmers add comments to their VB program code?
 
 
Answer:
Programmers add comments to program code to give information about
the program such as the name of the programmer,
the date the program was created, 
the purpose of the program, and any other information that 
might be useful to the reader of the program code.
 
 
 
 
3. What is the purpose of the EOF function in VB?
 
 
Answer:
The EOF function checks for the end of a file.
The EOF function returns a value of True if the end of the file is reached,
i.e. there is no more data to read from the file.
 
 
 
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.  When would a programmer use the Form_Load() procedure?

Answer: A programmer use the Form_Load() procedure 
in order to load values into variables 
before the form is displayed on the screen.
 
 
7. Write a short VB function to count and return the number of values above 50
from the set of values stored in an array of integers of student final exam scores.
The array should be passed to the function.
 
 
 
8. Write the truth table for the and, or and not logical operators. 

Answer: see Chapter 5.


9. Explain the statement:

On Error GoTo Error Handler

Answer: see Chapter 8.


10. What is the purpose of the ReDim statement in VB?

Answer: see Chapter 7.


 


 
 
Final Exam format 
 
Good Luck!