Question: Write a Python program and make sure the program run properly Write a program to help determine the likelihood of winning the lottery. People pick

 Write a Python program and make sure the program run properly

Write a program to help determine the likelihood of winning the lottery.

Write a Python program and make sure the program run properly

Write a program to help determine the likelihood of winning the lottery. People pick six integers from 1 to 59, inclusive. Six lottery numbers are selected at random from the same range. If a person's six numbers match the lottery-selected numbers, the person wins a large cash prize. If the user matches any five of the six lottery-selected numbers, the person wins a smaller but not insignificant prize. The basic program must do the following: 1) Have the user select six numbers. These numbers must be in the correct range and none of the numbers must not repeat (i.e. the user may not select the same number twice) 2) Randomly select six numbers. The same restrictions for number selection apply. 3) Sort the numbers entered by the user and by the lottery system so that the output is attractive 4) Assume the user plays approximately 9000 times - about three times per week for his or her lifetime of legal playing, about 57 years and that a lottery ticket costs $1.00 each. 5) Output the amount of money the user wins or loses. A sample of the basic program is below: Enter six numbers for the lottery: 17 38 14 44 7 50 You selected: 7, 14, 17, 38, 44, 50 On week 6359, numbers are: 7,14, 38,44, 50, 56 You're a MILLION DOLLAR winner!!! Your total return is $980925.00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Databases Questions!