Commit e82e0883 by BellCodeEditor

auto save

parent 40eb12f4
Showing with 17 additions and 5 deletions
#定义一个函数sum_numbers() import turtle
#要求这个函数能接收一个名为num的整型参数 turtle.pensize(10)
#要求这个函数能计算1+2+3+……+num的结果 turtle.fillcolor("blue")
turtle.begin_fill()
turtle.circle(50)
turtle.end_fill()
turtle.fd(90)
for i in range(2):
turtle.left(120)
turtle.fd(180)
turtle.left(120)
turtle.fd(90)
turtle.left(90)
turtle.fd(150)
turtle.hideturtle()
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