Commit 87e925a5 by BellCodeEditor

save project

parent 840a26ee
Showing with 18 additions and 29 deletions
# 悟空想海龟作图画出弹簧隧道,但是出现了bug,运行不了,请你帮助他,修改bug~ import random
import turtle miyu="你不是人她是人"
yiji="123456789的人特风雨哈弗计划口音恐婚哦耶黄陂南路"
sum=""
for i in miyu:
a1=random.choice(yiji)
a2=random.choice(yiji)
jiami=i+a1+a2
sum=sum+jiami
print(sum)
pen=turtle.Pen()
screen=turtle.Screen()
pen.speed(10000000)
pen.hideturtle()
screen.bgcolor('black')
i=0
while i<999:
pen.pencolor('pink')
pen.penup()
pen.goto(0,0)
pen.forward(200)
pen.pendown()
screen.circle(100)
pen.left(2)
i+=1
turtle.done()
\ No newline at end of file
# 勇于挑战的创造师,下面的代码犯了两类典型错误,请你把bug揪出来吧。 import random
area = ['盘丝洞','白骨洞','大雁塔'] ls=[random.randint(1,10),random.randint(1,10),random.randint(1,10),random.randint(1,10)]
monster = {'盘丝洞':'蜘蛛精','白骨洞': '白骨精','大雁塔':'花妖'} print(ls)
# 打印出大雁塔 sum=0
print(area[3]) for i in ls:
# 向字典中添加 '地府':'僵尸' sum=sum+i
monster.append('地府','僵尸') print(sum)
print(monster) \ No newline at end of file
\ 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