Commit abf9421e by BellCodeEditor

save project

parent 323fb8dc
Showing with 15 additions and 22 deletions
# 悟空想海龟作图画出弹簧隧道,但是出现了bug,运行不了,请你帮助他,修改bug~ with open(r"c:\Users\玛酷机器人\Desktop\新建文本文档.txt","r",encoding="utf-8") as a:
import turtle e=""
for i in a:
pen=turtle.Pen() b=i.split()
screen=turtle.Screen() # print(b)
pen.speed('fast') c=0
pen.speed(10) d=b[0]
pen.hideturtle() for i in b[1:]:
screen.bgcolor('black') c+=int(i)
e+=d+str(c)+"\n"
i=0 # print(e)
while i<135: print(e)
pen.pencolor('pink') with open(r"c:\Users\玛酷机器人\Desktop\新建文本文档.txt","w",encoding="utf-8") as f:
pen.penup() f.write(e)
pen.goto(0,0) \ No newline at end of file
pen.forward(200)
pen.pendown()
pen.circle(100)
pen.left(2)
i+=1
turtle.done()
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