Question: python programming please Problem #2 - 40pts - Create a function called lottery that takes a 3-digit lottery number for the user. Determine if the
Problem \#2 - 40pts - Create a function called lottery that takes a 3-digit lottery number for the user. Determine if the user wins according to the following rules. Your program should match the winning number(172) with the user's guess. Rule 1: Program returns 5000 when the user's guess matches all the digits in the winning number (172) in the exact order. Rule 2: Program returns 3000 when the user's guess matches all the digits in the winning number(172) but not in order. Rule 3: Program returns 500 if only one digit in the user's guess matches a digit in the winning number(172). Rule 4: Return 0 for no match For instance, 172500012730001075001005003330
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
