Question: Python Programming::: Write Python code to simulate a lottery. The program should randomly generate a 3-digit number. Continue to ask the user to enter a
Python Programming:::
Write Python code to simulate a lottery. The program should randomly generate a 3-digit number. Continue to ask the user to enter a 3-digit number until they type -999, determining the outcome for the user according to these criteria: Users entry is an exact match : Example: Winning # is 365 and user enters 365 User wins $10,000 All digits match, but in wrong order Example: Winning # is 365, user enters 635. User wins $3,000 One digit matches, position doesnt matter Example: Winning # is 365 and user enters 738 Example: Winning # is 365 and user enters 555 User wins $1,000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
