Question: This is Python Write a program that generates a lottery of a three-digit number. The program prompts the user to enter a three-digit number and

This is PythonThis is Python Write a program that generates a lottery of a

Write a program that generates a lottery of a three-digit number. The program prompts the user to enter a three-digit number and determines whether the user wins according to the following rules: a. If the user input matches the lottery number in the exact order, the award is $10,000. b. If all digits in the user input match all digits in the lottery number, the award is $3,000. c. If one digit in the user input matches a digit in the lottery number, the award is $1,000. Here are sample runs: Enter your lottery pick (three digits): 591 Lottery is 248 Sorry, no match Enter your lottery pick (three digits): 987 Lottery is 637 Match one digit: you win $1,000 Enter your lottery pick (three digits): 683 Lottery is 836 Match all digits: you win $3,000 Enter your lottery pick (three digits): 494 Lottery is 494 Exact match: you win $10,000

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!