Commit 1718d72a by BellCodeEditor

auto save

parent 5c00d472
Showing with 13 additions and 17 deletions
import turtle player=input("玩家出拳:石头\剪刀\布")
pen=turtle.Pen() print("玩家出"+player)
screen=turtle.Screen() import random
pen.bgcolor(bule) list=["石头","剪刀","布"]
pen.penup() nao=random.choice(list)
pen.goto(100,-100) print("计算机出"+nao)
pen.write("VDCVDHUsud\n dsbfsjdl\n ejfwbgwefbkuw\n",font=("Times",40,"normal")) if player==nao:
print("平局")
pen1=turtle.Pen() elif (player=="石头" and nao=="剪刀") or (player=="剪刀" and nao=="布") or (player=="布" and nao=="石头"):
print("恭喜,你赢了")
pen1.circle(100) else:
turtle.done() print("很遗憾,你输了")
\ No newline at end of file
# 勇于挑战的创造师,请运行以下代码,看看能不能删掉水果列表中的香蕉,运行结果是什么呢?
list=['苹果','香蕉','西瓜','香蕉','桃子','香蕉']
list.pop(2)
print(list)
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