hajim urcs
Computer Science @ Rochester

DMS102/CSC170D: Introduction to Web Development
Spring 2013

Assignment 5: Iteration

  1. [2 pts] Create a page that displays the square of each of the first ten integers starting at 1 using a table.
  2. [2 pts] Create a page that asks the user for a number and then displays the square of the ten numbers starting with that one, using a table.
  3. [2 pts] Create a page that uses a for loop to demonstrate each of the six possible HTML heading types (h1..h6).
  4. [2 pts] Create a page that asks the user for a number n and then uses a for loop to compute the value of n! (the factorial function). I'll save you the trouble of looking it up: n! is the product of all the numbers from 1 up to and including n.
  5. [2 pts] Create a page that asks the user for a year (number) and displays whether or not it is a leap year. Use only one if statement with a Boolean expression to do the test. The definition of a leap year is a year that is evenly divisible by 4, but not evenly divisible by 100, unless also evenly divisible by 400.
  6. [4 pts] Create a page that helps with grading as follows: Note: Think about how/when you need to start and end your table.

Things to think about

Last update: Thursday, 07-Feb-2013 11:08:24 EST