Question: Design a program that generates a five lottery number. The program should generate five random numbers, each in the range of 1 through 6 9

Design a program that generates a five lottery number. The program should generate five random numbers, each in the range of 1 through 69, and assign each number to a list element. (Random numbers were discussed in Chapter 5.) In addition generate one more random number between 1 and 26(this number can be stored in the list or separately). Then write another loop that displays the contents of the list.
Extra Credit: Prevent duplicate numbers in the first five random numbers

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 Programming Questions!