Write a program that uses a loop to calculate a factorial
of a number from a drop-down select. It should also display
the way the calculation was done. See example in figure
below.
2. Multiplying like rabbits. Make a page like that below that adds an image element
to a page using a timer. Mine added a picture of a rabbit every half second.
Make a page like that shown above. It allows the user to enter the number of times
the simulated die will be rolled. It should check that the input is a number and that it is
greater than or equal to one. It should set up a loop to simulate the roll of a die
the number of times the user specified. Make six variables -- the first to keep
track of the number of times a 1 was rolled, the second to keep track of the number of
times a 2 is rolled, etc. (I used a switch structure.) After the loop the program should
display the variable values. It should also display the percentages -- the percentage of
1's is the number of times a 1 was rolled divided by the total number of rolls times 100.
Due: Oct. 16
Wednesday
SnakeEyes.html uses a while loop to simulate rolling
the two dice while one has not rolled two 1's. That while loop was then placed inside a
for loop (nesting) to determine an average.