Commit f0c32daf by BellCodeEditor

auto save

parent d64a4b2d
Showing with 13 additions and 20 deletions
# 玩家出拳 import turtle
plar=input("请出拳(石头/剪刀/布):") pen=turtle.Pen()
print("我出:"+plar) pen.circle(100)
import random
list=["石头","剪刀","布"] pen.goto(0,25)
if plar in list: pen.circle(25)
computer=random.choice(list)
print("计算机出:"+computer) pen.goto(0,125)
if plar == computer: pen.circle(25)
print("平局")
elif plar=="布" and computer=="石头" or plar=="剪刀" and computer=="布" or plar=="石头" and computer=="剪刀": pen.goto(0,50)
print("你赢了") pen.circle(50,-180)
else: pen.circle(-50,180)
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