Project 9.1 LottoFever 

Index Code Tester
 
Your objective is to create a web page that will simulate playing the lottery.  The program will let the users pick their 6 lucky numbers once and then play the lottery until they win.  After the user picks 6 numbers and clicks the play button the program will keep picking the 6 winning numbers until the user wins.  The program will keep track of and display the number of correct matches for each drawing.  Normal lotteries let users pick numbers between 1 and about 50.  If you let the user pick numbers between 1 and 50, the program will take a long time to run.  Therefore you should allow the user to choose the maximum number that can be selected.  In the example below, the user has set this upper bound to be 10.   Your grade will be based on the following:
 
___ / 10:  It should allow the user to enter the maximum number for the drawing.  For most lotteries, the user can pick numbers between 1 and the upper bound which is generally about 50.  Your program should let the user select the upper bound for the lottery.
 
___ / 10:  It should allow the user to enter 6 numbers.  The program should ensure that the user enters numbers and that they are in the range from 1 to the upper bound entered by the user. 
 
___ / 10:  When the user clicks the Play button, the program should repeatedly pick 6 winning numbers until the user's numbers match the winning numbers.  Ensure that the 6 winning numbers are all different from each other. For example, the following set of numbers is not valid: 3, 16, 22, 16, 8, 11.
 
___ / 10:  After the user wins, the program should display the number of tickets the user would have had to buy to win.  This number is just the number of times that the program picked the winning numbers.
 
___ / 10:  The program should display the date that the user will win based on the number of tickets he would have had to buy.  Assume that the user buys one ticket per week until they win.
 
___ /10:  The program should display the number of times that the user had 0 matches, 1 match, 2 matches, 3 matches, 4 matches, 5 matches, and 6 matches. 
 
___ / 10:  The program should display the data for the number of matches in bar graph form.