Commit 3d263af9 by BellCodeEditor

save project

parent d1c1535d
Showing with 16 additions and 3 deletions
#定义一个函数sum_numbers() import turtle
#要求这个函数能接收一个名为num的整型参数 pen = turtle.Pen()
#要求这个函数能计算1+2+3+……+num的结果 pen.shape("turtle")
pen.color("pink")
for i in range(5):
pen.forward(100)
pen.left(144)
pen.hideturtle()
turtle.done()
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