Commit d8b46c32 by BellCodeEditor

auto save

parent 1bad0edb
Showing with 16 additions and 31 deletions
# 悟空想海龟作图画出弹簧隧道,但是出现了bug,运行不了,请你帮助他,修改bug~ import turtle as t
import turtle import random
pen=turtle.Pen() color=['red','blue','yellow','green','pink']
screen=turtle.Screen() for i in range(5):
pen.speed() t.pencolor(random.choice(color))
pen.hideturtle() t.forward(200)
screen.bgcolor('black') t.right(144)
t.hideturtle()
i=0 t.done()
while i<135:
pen.pencolor('pink')
pen.penup()
pen.goto(0,0)
pen.forward(200)
pen.pendown()
pen.circle(100)
pen.left(2)
i+=1
turtle.done()
\ No newline at end of file
# 勇于挑战的创造师,下面的代码犯了两类典型错误,请你把bug揪出来吧。 import random
area = ['盘丝洞','白骨洞','大雁塔'] list=["剪刀",'石头','布']
monster = {'盘丝洞':'蜘蛛精','白骨洞': '白骨精','大雁塔':'花妖'} a=input("请输入")
# 打印出大雁塔 print("玩家出拳:"+a)
print(area[3]) c=random.choice(list)
# 向字典中添加 '地府':'僵尸' print("电脑出拳:"+c)
monster.append('地府','僵尸')
print(monster)
\ 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