Commit bb4498d4 by BellCodeEditor

save project

parent a66740ae
Showing with 36 additions and 3 deletions
import turtle
pen = turtle.Turtle()
pen.color('sienna')
# pen.speed(1)
# 画布大小
w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
# 移动到起点
pen.left(90)
pen.up()
pen.backward(150)
pen.down()
#树干
pen.forward(100)
#树枝
pen.right(30)
pen.forward(50)
pen.up()
pen.backward(50)
pen.left(60)
pen.down()
pen.forward(50)
pen.up()
pen.backward(50)
pen.right(30)
pen.backward(100)
turtle.done()
\ No newline at end of file
......@@ -2,6 +2,6 @@ alist = [88, 75, 72, 82, 90, 85, 78, 91]
l = len(alist)
for i in range(0,l-1):
for j in range(0,l-1):
if alist[j] >alist[j+1]:
if alist[j] < alist[j+1]:
alist[j],alist[j+1] = alist[j+1],alist[j]
print(alist)
\ No newline at end of file
print(alist)
\ 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