Answer
$Code$
Work Step by Step
$Code:$
import random
lottery = random.randint(0, 100) * 1000
guess = int(input("Enter three-digit number:"))
lotteryDigit1 = lottery / 100
remainDigits = lottery % 100
lotteryDigit2 = remainDigits / 10
lotteryDigit3 = remainDigits % 10
guessDigit1 = guess / 100
remainingDigits = guess % 100
guessDigit2 = remainDigits / 10
guessDigit3 = remainDigits % 10
print("The lottery number is {}".format(lottery))
if guess == lottery:
$ $ $ $ print("Exact match:you win 10,000")
else:
$ $ $ $ print("not win")
$Output$: