hajim urcs
Computer Science @ Rochester

DMS102/CSC170D: Introduction to Web Development
Spring 2013

Assignment 4: Expressions and Conditions

  1. [3 pts] Create a page that (a) asks the user for their favorite flavor of ice cream; (b) uses the answer in a followup question; and (c) and displays the answer to that second question.
  2. [3 pts] Create a page that asks the user for two numbers (that is, asks twice for one number each time) and then displays the numbers and their sum, difference, product, and quotient as a table in the page.
  3. [3 pts] Create a page that asks the user for a number and reports whether or not the number is even. Hint: Think what it means to be even and check out the remainder operator (%).
  4. [3 pts] Fix your script from question 2 so that it displays an appropriate message for the quotient if the user enters the number 0.
  5. [3 pts] Create a page that asks the user for an hour (a number) between 0 and 23 and reports whether the hour corresponds to morning (6-11), afternoon (12-18), or night (18-23 and 0-5).
  6. [3 pts] Create a page that asks the user for their name and their favorite genre (kind) of music, and then does the following: Have your script produce a nice summary of the answers as the content of the page.

Things to think about

Last update: Thursday, 07-Feb-2013 09:41:35 EST