Chris Pollett >
Old Classes >
PIC40

   ( Print View )

Lecture Notes-PDF

Spring '01 Ad: Enrollment info

Course Info: Homework Assignments:
Practice Exams:
PIC:
                           












PIC 40 Practice Midterm

What to expect from the real thing:
The real midterm will be in class, closed book, closed notes and have five problems of approximately the same difficulty as those below. Each problem will be worth 5pts. One of the problems below is guaranteed to be on the actual midterm. To minimize the chaos at the start and end of the test and also to ensure everyone gets to work on the test the same amount of time, there is an enforced two point penalty for starting the test before I say begin or after I say stop.
What to bring:
Remember to bring your Student ID. Remember to leave any cell phones, pagers, or other things that go beep at home.
Practice Problems:
  1. Write an .htaccess> file that password protects the file bob.html using the passwords in the file /usr/local/bob/htpasswd.
  2. Give a Perl regular expression for the following English search patterns:
    1. Strings beginning with a or b and ending with C.
    2. Strings containing one or more occurrences of the two words Chris and raise.
    3. Strings having three or more words.
  3. Write a style sheet which makes the body's background white, the paragraph appear black and h1 headings appear in italics.
  4. Write a Perl script which gets an input line from the user. It then splits the line into words and prints out "Yeah!" if this array of words is the same forwards and backwards. For example, bob is tom would be tom is bob reversed so would not be the same. However, "bob is bob" should make the program say "Yeah!".
  5. Write an HTML page which uses frames to split the screen into three regions. The first region is the top 20% of the page. Put the file doc1.html in this region. The next two regions are the left 60% of the remaining part of the screen and the right 40%. Target, respectively, doc2.html and doc3.html to these regions.
  6. Write a Perl program that receives an array of numbers from the standard input then computes there average.
  7. Suppose your homepage has been relocated to http://www.somewhere2.org. You would like to forward old site users to the new site automatically. Give an example HTML page for the old site to do this.
  8. Explain the HTML needed to prevent search engines from indexing your site.
  9. Write the HTML needed to make an unordered list of five reasons why the sky is blue.
  10. Write the HTML needed to make a table of five employees listing their names, their SSN's, and their salaries.