Commit 93714740 by BellCodeEditor

save project

parent 50c0d220
Showing with 12 additions and 16 deletions
import random import turtle
bianliang=input("玩家请出拳:(剪刀/石头/布)") pen=turtle.Pen()
print("玩家出拳:"+bianliang) pen.pencolor("red")
list=["剪刀","石头","布"] pen.pensize(5)
jsj=random.choice(list) pen.left(45)
print("计算机出拳:"+jsj) pen.forward(100)
if bianliang in list: pen.circle(50,180)
if bianliang==jsj: pen.right(90)
print("平局yeeee") pen.circle(50,180)
elif (bianliang=="剪刀" and jsj=="布") or (bianliang=="布" and jsj=="石头") or (bianliang=="石头" and jsj=="剪刀"): pen.forward(100)
print("你赢了!耶斯莫拉!") turtle.done()
else: \ No newline at end of file
print("你输了")
else:
print("输入错误")
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