Random Numbers
A valuable element in user interaction is the introduction of random numbers
The first example simply generates a random number between 1 and 7.
View Result
In the next example, the user has to guess a number between 1 and 7.
View Result
In the third example, a Shakespearean insult is generated by combining three phrases from
three different arrays (lists) into one phrase.
View ResultSample Projects
- Students will create a poetry generating web page using the same techniques as the previous exercise. If possible, include random generation of images and/or background colors.