Commit 7016688c by BellCodeEditor

save project

parent 6391d41e
Showing with 6 additions and 17 deletions
asd=input("请出拳") import turtle
print("玩家出的是:"+asd) pen=turtle.Pen()
import random pen.write("你好",font=("Times",18,"normal"))
b=["石头","剪刀","布"] pen.hideturtle()
c=random.choice(b) turtle.down()
print("电脑出:"+c) \ No newline at end of file
if asd in b:
if asd==c:
print("平局")
elif (asd=="石头"and c=="剪刀")or(asd=="布"and c=="石头")or(asd=="剪刀"and c=="布"):
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