Question: Create a Web page named randSeq.html that generates a random 3-letter sequence. When the user clicks on a button, a function named GenerateSequence should be

Create a Web page named randSeq.html that generates a random 3-letter sequence. When the user clicks on a button, a function named GenerateSequence should be called to generate and display a sequence of 3 randomly chosen letters. The function should contain the following statement, which calls the RandomChar function from the random.js library to select the random letters and concatenate them.

sequence = RandomChar('abcdefghijklmnopqrstuvwxyz') +

RandomChar('abcdefghijklmnopqrstuvwxyz') +

RandomChar('abcdefghijklmnopqrstuvwxyz');

There are approximately 550 different three-letter words in the English language and 263 = 17,576 possible three-letter sequences. As a result, the likelihood of obtaining a word at random is 550/17,576, or close to 1/32. Use your Web page to generate 32 random three-letter sequences. Did you obtain any words? Would it surprise you if you didn't obtain any words, or obtained more than one? Explain.

Step by Step Solution

3.46 Rating (169 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

I obtained 2 word... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

1409-C-S-O-S(1012).docx

120 KBs Word File

Students Have Also Explored These Related Operating System Questions!