Purchase Solution

Pick Four in HTML

Not what you're looking for?

Ask Custom Question

Most lotteries work by selecting a random sequence of balls, each labeled with an integer in some specified range. For example, pick-4 lotteries typically utilize four bins, each containing 10 balls labeled 0 through 9. If there are 10 balls to choose from in each of four bins, then 10^4=10000 different number sequence can potentially be picked. Increasing the number of balls significantly increases the numbr of possible sequences , which significantly descreases a person's odds of winning. FOr wxample, if there are 20 balls to choose from in each bin, 20^4=160000 different number sequences could be selected.

Create a web page named pick4.html that promopts the user for the highest ball number and then generates a random Pick-4 sequence. That is, if the user ethers 9 as the highest ball number, then the page should generate and display four numebers in the range to 9, such as 5-0-8-2.

Note: You can generate a random integer in the range of 0 to N using the expression:
Math.floor((N+)*Math.random()

Since the call Math.random() returns a number in the range 0 (inclusive) to 1 (exclusing), multiplying the number N+1 yields a number in the range 0(inclusive) to N+1 (exclusive), rounding that number down using Math.floor yields an integer in the desired range: ) to N.

Attachments
Purchase this Solution

Solution Summary

The solution examines a pick four in HTML for most lotteries

Purchase this Solution


Free BrainMass Quizzes
Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic Networking Questions

This quiz consists of some basic networking questions.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.