Commit 24b3dc0e by BellCodeEditor

auto save

parent 4a7d5b1e
Showing with 18 additions and 20 deletions
import turtle alist = [88, 75, 72, 82, 90, 85, 78, 91]
screen=turtle.Screen()
screen.bgcolor("light blue")
pen=turtle.Pen() n = len(alist)
pen.penup()
pen.write("你不好",font=("Times",20,"normal")) for i in range(0, n-1):
pen.hideturtle() for j in range(0, n-1):
pen1=turtle.Pen()
pen1.goto(-100,0) if alist[j] < alist [i + 1]:
pen1.pensize(5) alist[j], alist [j + 1] = alist[j + 1], alist[j]
print(alist)
pen1.pencolor("red")
pen1.left(45)
pen1.forward(100)
pen1.circle(50,180)
pen1.right(90)
pen1.circle(50,180)
pen1.forward(100)
pen1.hideturtle()
turtle.done()
\ No newline at end of file
def peach(n):
if n == 10:
return 1
num = (peach(n+1)+1)*2
return num
peach_num = peach(6)
print(peach_num)
\ 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