Commit 75ca2e01 by BellCodeEditor

auto save

parent a1496b3f
Showing with 54 additions and 2 deletions
player = input("请输入(石头/剪刀/布):")
print("玩家出拳:"+player)
import random
list = ["石头","剪刀","布"]
computer = random.choice(list)
print("计算机出拳:"+computer)
if player in list:
if player == compuifter:
print("平局")
elif (player=="石头" and computer=="布") or (player=="布" and computer=="剪刀") or (player=="剪刀" and computer=="石头"):
print("计算机赢")
else:
print("玩家赢")
else:
print("请重新输入")
print("Hello World!")
\ No newline at end of file
#导入模块
import turtle
#创建画笔
p = turtle.Pen()
#创建屏幕
s = turtle.Screen()
#改变屏幕背景颜色
s.bgcolor("red")
#起笔
p.penup()
#改变画笔位置
p.goto(100,150)
#落笔
p.pendown()
#改变画笔速度
p.speed(1000)
#改变画笔颜色
p.pencolor("red")
#改变画笔形状
p.shape("circle")
#填充颜色
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