Have the user enter the number of terms they would like summed in the series for Pi.
Timer
The Start button starts a timer that changes the display by 0.01 every 100th of a second. The
Start button is hidden and the Stop button shown (or one could simply change the text value of the
button). The Stop button stops the timer and the display freezes at that point. The Stop button
is then hidden and the Start button displayed. The Stop button also enables the Clear button. The
Clear button sets the display back to 000.00.
Salary Comparison. Design a page that compares two employees' salaries. The first
makes $100.00 a day. The second's salary starts at one cent and doubles every day
(0.01, 0.02, 0.04, ...). Make a comparison of their cumulative salaries for each day.
These should be displayed dynamically side-by-side (you can place each in a table). Your
program should stop when the second employee's cumulative salary exceeds the first's.
Using a drop-down select the user enters a number of dollars to start with.
A spin of the roulette wheel is simulated using a random number generator to draw
a number between 1 and 38. The numbers 1 through 36 are themselves and 37 and 38
correspond to 0 and 00.
According to http://en.wikipedia.org/wiki/Roulette {1, 3, 5, 7, 9, 12, 14, 16, 18, 19,
21, 23, 25, 27, 30, 32, 34, 36} are Red; {2, 4, 6, 8, 10, 11, 13, 15, 17, 20, 22, 24, 26,
28, 29, 31, 33, 35} are Black; and 0 and 00 are Green.
Assuming the player bets on Red, determine if the player has won or lost a
dollar and adjust the player's amount. (I used a switch. See
QuickRoulette.htm)
The player continues to bet while he/she has money. Count the number of spins
of the wheel needed for the player to lose his/her money.
Place the above in a loop that repeats the simulation process the number of
times requested by the user. (Don't forget to reset the player's amount and the spin
counter.)
Keep a history of the number of spins needed in a textarea.
Calculate the average number of spins.
Clear out the results if the user changes any input.
Make sure the user enters a number for the sample size.
TowardTimer.htm (a start to the timer homework --
based on question asked in class) Kolarizer.htm (needs to be in folder you get
from expanding the above zip file) TextAreaNewLine.htm (getting a new line
in a textarea -- based on question asked in class. It's tricky because
textarea's support both innerHTML and value. The latter works a bit better
from browser to browser; it uses the escape sequence \n.)