猜拳游戏
import random

while 1:
    ai = random.randint(1, 3)
    user = str(input("shi jian bu"))
    if user == 'shi':
        user = int(1)
    elif user == 'jian':
        user = int(2)
    elif user == 'bu':
        user = int(3)
    else:
        print("retype your choice")
    key = int(user) - int(ai)
    if key == 0:
        print("equal")
    elif key == -1 or key == 2:
        print("win")
    elif key == 1 or key == -2:
        print("lose")
    if ai == 1:
        print("ai is shi")
    elif ai == 2:
        print("ai is jian")
    elif user == 3:
        print("ai is bu")