Question: Write a python program that randomly generates a number from 0-99 (inclusive), prompts the user to enter a number from 0-99, and prints out how
Write a python program that randomly generates a number from 0-99 (inclusive), prompts the user to enter a number from 0-99, and prints out how much is won according to the following rules: If the user's input matches the lottery number in the exact order, the award is $10,000 If all the digits in the user's input match all the digits in the lottery number but in a different order, the award is $3,000 If only one digit in the user's input matches one digit in the lottery number, the award is $1,000 How can we get the individual digits? Assume num is a number from 0-99. num // 10 gets tens digit. num % 10 gets ones digit.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
