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

python programming please
python programming please Problem \#2 - 40pts - Create a function called

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

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!