Menu

[Solved]-Python State Process Creating Weekly Lottery Week Five Distinct Random Integers 1 30 Inclu Q37200832

PYTHON:

Your state is in the process of creating a weekly lottery. Oncea week, five distinct random integers between 1 to 30 (inclusive)are drawn. If a player guesses all of the numbers correctly, theplayer wins a certain amount.

The program should:

a. Generate five distinct random numbers between 1 and 30(inclusive) and store them in an array.

b. Sort the array containing the lottery numbers.

c. Prompt the player to select five distinct integers between 1and 30 and store the numbers in an array. The player can select thenumbers in any order, and the array containing the numbers need notbe sorted.

d. Determine whether the player guessed the lottery numberscorrectly. If so, the program outputs the message “You win!”;otherwise it outputs the message “You lose!” and outputs thelottery numbers.

The program should allow a player to play the game as many timesas the player wants to play. Before each play, generate a new setof lottery numbers.

Expert Answer


Answer to PYTHON: Your state is in the process of creating a weekly lottery. Once a week, five distinct random integers between 1 … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *