Commit dfdb7c6c by BellCodeEditor

save project

parent ab6dd0a5
Showing with 24 additions and 8 deletions
alist = [88,75,72,82,90,85,78,91]
import turtle
n = len(alist)
pen = turtle.Turtle()
pen.color('sienna')
w = turtle.Screen()
w.bgcolor('wheat')
pen.left(90)
pen.up()
pen.backward(150)
pen.down()
for i in range(0, n-1)
for j in range(0, n-1)
if alist[j] < alist[j+1]:
alist[j],alist[j+1] = alist[j+1],alist[j]
\ No newline at end of file
def tree(n):
if n >= 50:
pen.forward(n)
pen.right(30)
tree(n-50)
pen.left(60)
tree(n-50)
pen.right(30)
pen.up()
pen.backward(n)
pen.down()
tree(100)
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