Commit 9c3f71fc by BellCodeEditor

auto save

parent c256c561
Showing with 51 additions and 2 deletions
# 我们都爱夸夸夸 # 我们都爱夸夸夸
\ No newline at end of file a=input("请输入:")
print("玩家:"+a)
import random
list=["石头","剪刀","布"]
if a in list:
b=random.choice(list)
print("计算机:"+b)
if (a==b):
print("平局")
elif (a=="石头" and b=="布") or (a=="布" and b=="剪刀") or (a=="剪刀" and b=="石头"):
print("计算机赢")
else:
print("玩家赢")
else:
print("请输入正确格式")
#导入模块
import turtle
#背景颜色
turtle.Screen().bgcolor("pink")
#创建画笔
p = turtle.Pen()
#起笔
p.penup()
#改变画笔位置
p.goto(100,150)
#落笔
p.pendown()
#改变画笔颜色
c=input("请输入颜色:")
p.color(c)
#改变画笔速度
p.speed(1000)
p.fillcolor("yellow")
#开始填充
p.begin_fill()
#循环36
for i in range(36):
#画笔的移动
p.forward(200)
#旋转
p.left(170)
#结束填充
p.end_fill()
#隐藏画笔
p.hideturtle()
#保存画布
turtle.done()
\ 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