Commit 62e5ac59 by BellCodeEditor

save project

parent 3d12760a
Showing with 10 additions and 21 deletions
player=input("请出拳:石头/剪刀/布")# 玩家出拳 import=turtle
print("玩家出拳:"+player) screen=turtle.Screen
import random screen.bgcoior("red")
list=["石头","剪刀","布"] pen=turtle.Pen
computer=random.choice(list) pen.penup()
print(computer) pen.goto(-100,100)
if player in list: pen.pendown()
if player==computer: pen.write("你好\nSB",font=("Times",80,"normal"))
print("平局") pen.hideturtle()
elif player=="石头"and computer=="剪刀": turtle.done
print("玩家赢")
elif player=="剪刀"and computer=="布":
print("玩家赢")
elif player=="布"and computer=="石头":
print("玩家赢")
else:
print("你输了")
else:
print("输入错误")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment