Computer Science 111; October 12, 2006

Lab #6 = Homework #6

The purpose of today's lab (and homework) is to introduce you to web page construction, with the twist that you will write a python program that generates a tailored web page for the user.

Part 1. First, you will create a simple web page and go through all of the steps to "publish" it in your account on Hermite. Then you will learn how to use python to create a page. The language that browsers can interpret is called html, or hyper-text markup language.

Part 2. Now you will write a python program called lab7.py, that creates a similar html file, called lab7user.html. This program asks the user which image to display.
This time, create the python file directly in your public_html subdirectory. To do this, type
cd public_html
where cd stands for change directory. Then do what you usually do: emacs lab7.py, etc.

Your python file will open lab7user.html in write mode. Part 3. After you have everything working so far, go to this page: http://www.cwru.edu/help/introHTML/toc.html, an introduction to HTML. Part 4. Extra Credit After all of the above is working, add two function definitions.

This lab is this week's homework. When you are done with it, by midnight Wednesday October 18.

submit homework6 lab6.py
Also! make sure to submit the three gif images, for example:
submit homework6 Darth.gif
Don't forget to use sftp to make sure that each partner has a copy of the files.