CSCI165 - Final Exam Study Guide

Last updated: Monday 28th March 2011, 18:42 PT, AD

REFRESH THIS PAGE OFTEN FOR LATEST VERSION

Final Exam format



Chapter 9 of the recommended textbook (hand out) "The Internet"
covered in the first few weeks of the semester
will NOT be on the final exam.





*************************************
In addition to the resources listed below,
students should review past quiz
and midterm exam questions
on the following topics
in preparation for the final exam.
*************************************


Topics to be studied for the final exam:


Go to the course resources page and study each resource listed under these major headings:


HTML
XHTML
CSS 
Web Design
Python Programming 
Internet Programming 


Under each of the sections listed above 
is an instruction of exactly what needs to be studied for the final exam.


SEE BELOW FOR SAMPLE FINAL EXAM QUESTIONS ->




********************************************************
Example final exam questions (some with answers) follow:
********************************************************






Example exam questions for Python Programming:



*************************************************************************************


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. Written Question:

What are the most important differences between HTML and XHTML?



******
Answer: see course resources

*************************************************************************************


11. Written Question:

How are style statements added to an XHTML web page?



*******
Answer: see course resources

*************************************************************************************


12. Short Answer Question:

Write a Python program to enter an integer number, and output the word "Odd"
if it is an odd number (1,3,5,7 ...) otherwise output the word "Even"





*******
Answer:

x = input("Please enter a whole number")
x = int(x)
if x % 2 == 1:
	print ("Odd")
else:
	print ("Even")


*************************************************************************************

13. Predict-the-output Question: 

What is the output of this Python program?

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





*******
Answer: 

27.0

*************************************************************************************

14.  Predict-the-output Question: 

What is the output of this program?


<html>
<!-- test01.php -->
<body>

   <?php 
      $x = 2;
      for ($i = 1; $i <= 6; $i++)
      {
          if ($i % 2 == 1)
          {
             $x++;
          }
          print $i . 'x' . $i * $x . " ";
      }

   ?>

</body>
</html>





*******
Answer: 

1x3  2x6  3x12  4x16  5x25  6x30

*************************************************************************************

15.  Written Question

Explain the term "Internet Programming"

*************************************************************************************

16.  Written Question

Explain the importance of spacing and indentation in a Python program

*************************************************************************************




Final Exam format

Good Luck!