In: Computer Science
One of the games of the Massachusetts Lottery is the daily numbers. Four digits (0 - 9) are drawn at random thus producing a 4 digit number.
Your friend has the following theories about the digits drawn:
#1. Over the year the average of the total of the 4 digits drawn each day is 24
#2. If the first digit of the 4 digits drawn is even the last digit is odd at least 75% of the time
#3. The middle digits of the 4 digits drawn are the same at least 35% of the time.
#4. The digit 5 is the most frequently appearing digit in the numbers drawn in the first quarter of the year (ie the first 13 weeks).
#5. Even digits are more common than odd digits
#6. A number with all the same digits appears at least 3 times per year
Generate a list of lists. Then write code that will test the theories above for one year (52 lists of 4 digits each). Print to the screen the results of your analysis.
Please done in Python format.