Midterm Review

The midterm will be closed books and notes. You will be asked to provide short essay answers to questions, to write HTML, CSS, and Python code, and to understand provided samples of code enough to answer questions.

In studying for this midterm, you should review all of the notes on the course calendar. There are also links below to specific notes of interest. You should practice answering questions and writing code with pencil and paper-- writing code on paper is much different than on the computer.

You are encouraged to set-up an appointment with your instructor to go over material, or attend his office hours Wednesday afternoon, 3:30 (Harney 529).

The following are sample questions-- these exact questions won't be on the test, but they are indicative of the types of questions you'll be asked to answer. The number in parenthesis for each section refers to the approximate percentage of the test devoted to that subject.

1. HTML and CSS (~50%)

How can CSS be used to provide a uniform look to an entire web site?

You can define styling within an HTML element, within an HTML page, and within a separate CSS file. Provide an example of each.

How are IDs and Classes used to connect HTML elements to their styling? When is it appropriate to use each?


One styling definition can override another. Explain how this works within HTML and provide an example.

 
Write a web page which has two columns of information. Do not use a table. Provide both an HTML file and a CSS file. The HTML should have no styling-- all styling, including the
placement of information into two columns, should be defined in the CSS.

How do you specify a link with HTML? An image? What is the difference between a relative and absolute reference to a resource?


Consider the following code:
    
    <img src="images/somePic.jpg"></img>


Suppose this code appeared on the web page http://cs.usfca.edu/~ajjones/website1/index.html. Where is the file somePic.jpg located?

How is color represented with HTML and CSS? What is the color rgb(0,255,0)? What is the color #FF00FF?
Convert the hexadecimal number 24 into base-10. Convert the base-10 number 17 into hexadecimal.

Supplementary Notes: HTML 101, HTML 102

2. Programming (~20%)

What is a variable in programming?

Describe a robot behavior that would require a program with iteration (a loop). How might you use a nested loop (loop within a loop) in a robot program?

Describe the program blocks in a robot program to 1) drive in a circle along a black circuit on a white background, 2) drive back and forth on a black line.


How would you describe the following Python programming statement in English? How can value equal itself plus one?

        value = value + 1

Write a program that counts coins. The program should allow the end-user to enter the number of pennies, nickels, dimes, and quarters, and it should print out the total amount.

Write a program that counts up the first n numbers.

Consider the following program:

    total = 1
    i=0
    while i<5:
        total=total*i
    print total

What does the program print? What do you think the program is supposed to do? How would you change the program so that it worked (2 changes are necessary).

Supplementary Notes: Named Memory Cells

3. Web architecture (~10%)

What is the difference between a static web page and a dynamic web page? Where would Python or some other programming code fit in?

When you enter a URL in your browser, what network communication occurs?
What is a DNS server?

Supplementary Notes: Web Architecture

4. Cloud Computing (~10%)

How can cloud computing help innovation? How does it help small businesses?

How does cloud computing help the ordinary person?

What is scalability?

Is storing your information on the cloud more or less secure than on your own servers?

Why wasn't cloud computing used ten years ago? How does this question relate to Moore's law?

Supplementary Notes: Cloud Computing

5. Search (~10%)

Explain how Google ranks web pages-- what was their world-changing innovation?

Explain the following formula, describing the importance of each symbol.

PR(u) = \sum_{v \in B_u} \frac{PR(v)}{L(v)}

What is a limitation of traditional (Google) search engines and how does the World Live Web solve the problem. Be sure and mention crawling and pinging in your answer.

In counting the terms that appear in a web page, search engines don't count all terms the same. Describe how an effective term analysis works within a search engine.

Supplementary Notes: Search

Recent site activity