Html Exercises

Don't forget the Webpage Teachpack.

1.1 More Kinds of Questions

Extend the question data definition to support both binary questions and questions with three alternatives. In the new kind of question, allow the alternatives to vary from question to question (unlike the boolean questions which are always "yes/no" questions). The correct answer must not be in a fixed position.

The changes to the data definition should guide your modifications to the code below!

1.2 More Questions

Bring your quiz up to 10 questions. Include these two questions:

1) What was the last state to join the United States?

  • Alaska
  • Hawaii
  • Guam
(Hawaii is correct -- altho Guam might be correct some day)

2) What is read and black and white all over?

  • A newspaper
  • A bleeding zebra
  • An old TV covered in catsup
(the first is correct)

1.3 Status

Extend the quiz code from class to show the number of questions so far and the number correct so far on each question.

Robby Findler