import random as ra
lottery_num = 0
guess_num = 0
print("This game scissor(0),rock(1),paper(2).")
count_guess = 0
count_lottery = 0
lot_t = ""
gue_t = ""
while count_lottery <= 2 or count_guess <= 2:
lottery_num = ra.randint(0, 2)
guess_num = ra.randint(0, 2)
if lottery_num == 0:
lot_t = "剪子"
elif lottery_num == 1:
lot_t = "石头"
elif lottery_num == 2:
lot_t = "布"
if guess_num == 0:
gue_t = "剪子"
elif guess_num == 1:
gue_t = "石头"
elif guess_num == 2:
gue_t = "布"
print(f"The Computer show {lot_t} and User show {gue_t}.")
# this base text show
if lottery_num == 0 and guess_num == 2:
print(f"The Computer is {lot_t}, and User is {gue_t} This game is computer win.")
count_lottery += 1
elif lottery_num == 2 and guess_num == 0:
print(f"The Computer is {lot_t}, and User is {gue_t} This game is User win.")
count_guess += 1
elif lottery_num > guess_num:
print(f"The Computer is {lot_t}, and User is {gue_t} This game is computer win.")
count_lottery += 1
elif lottery_num < guess_num:
print(f"The Computer is {lot_t}, and User is {gue_t} This game is User win.")
count_guess += 1
# This program not result to draw. so this is content become note text!!
elif lottery_num == guess_num:
print(f"The Computer is {lot_t}, and User is {gue_t} This game are draw.")
# success this program
if count_lottery == 2 and count_guess < 2:
print("This game Computer is Winner.")
break
elif count_lottery < 2 and count_guess == 2:
print("This game User is Winner.")
break