Commit 88de2bd4 by BellCodeEditor

save project

parent f7da7e50
Showing with 14 additions and 39 deletions
import turtle
import random
def tree(n):
if n>=50:
pen.pensize(n/10)
pen.forward(n)
angle=random.randint(0,30)
lenght=random.randint(1,15)
pen.right(30)
tree(n-lenght)
pen.left()
tree(n-lenght)
pen.right(30)
pen.up()
pen.backward(n)
pen.down()
pen=turtle.Turtle()
pen.color('sienna')
pen.speed(0)
w=turtle.Screen()
w.bgcolor("wheat")
pen.left(90)
pen.up()
pen.backward(150)
pen.down()
tree(60)
turtle.done
\ No newline at end of file
list=('0','1','2','3','4','5') self.y=20
list.remove('1') self.val=0
print(list) self.v=IntVar()
\ No newline at end of file for info in alist:
self.canvas.creat_text(40,self.y,text=info,font=("宋体",11),anchor=w,fill='#FF9900')
self.y+=30
def get_info(self):
info=self.ent.ent.get()
self.ent.delete("0",END)
if info!="":
alist.append(info)
self.canvas.creat_text(40,self.f,text=info,font=("宋体",11),anchor=W,fill='#FF9900')
self.y+=30
\ 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