Commit 5d5f28d4 by BellCodeEditor

save project

parent 89ff271b
Showing with 8 additions and 3 deletions
...@@ -4,5 +4,10 @@ def rabbit(n): ...@@ -4,5 +4,10 @@ def rabbit(n):
if n>2: if n>2:
nu = rabbit(n-1)+rabbit(n-2) nu = rabbit(n-1)+rabbit(n-2)
return nu return nu
num = rabbit(8) num1 = 0
print(num) while True:
\ No newline at end of file num1 += 1
num = rabbit(num1)
if num >= 20:
print(num)
break
\ 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