import random
def main():
number = random.randint(0,100)
print(number)
guess = int(input("Enter your guess: "))
if guess == number :
print("You win $10,000!")
elif guess // 10 == number // 10 or guess % 10 == number % 10 :
print("You win 1,000$!")
elif guess // 10 == number // 10 and guess % 10 == number % 10 :
print("You win $3,000!")
else :
print("You win $0.")
main()
and
このプログラムは、ステートメントを除いて機能します。誰かが理由を知っていますか?