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): def func(n):
if n == 1: if n <=2:
return 1 return 1
num = peach(n-1)+n elif n>2:
return num value = func(n-1)+func(n-2)
peach_num= peach(2) return value
print(peach_num) result=func(5)
\ No newline at end of file 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