Commit 42825633 by BellCodeEditor

save project

parent b81035cc
Showing with 14 additions and 7 deletions
import turtle
pen=turtle.Pen()
pen.write("诺依,\nturtie真好用,我会在画布上写字啦!",font=("Times",1,"normal"))
pen.hideturtle()
turtle.done()
\ No newline at end of file
def peach(n):
if n == 1:
def func(n):
if n <=2:
return 1
num = peach(n-1)+n
return num
peach_num= peach(2)
print(peach_num)
\ No newline at end of file
elif n>2:
value = func(n-1)+func(n-2)
return value
result=func(5)
print(result)
\ 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