Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Lucas Number Recursive Function
eeperry
Feb 8th, 2013
285
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Python
0.21 KB
| None
|
0
0
raw
download
clone
embed
print
report
# Lucas numbers recursive function
# Get the nth Lucas number
def
get_lucas
(
n
)
:
if
n
==
0
:
return
2
elif
n
==
1
:
return
1
else
:
return
get_lucas
(
n-
1
)
+ get_lucas
(
n-
2
)
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
✅ API Flaw Money Method
CSS | 10 min ago | 1.03 KB
This month smells like money
CSS | 16 min ago | 1.03 KB
⭐ Exploit Documentation ⭐
CSS | 21 min ago | 1.03 KB
Untitled
13 hours ago | 42.88 KB
z66is_archive.zip.txt
1 day ago | 36.47 KB
block universe of arithmetic truth
1 day ago | 1.91 KB
programAssembly
1 day ago | 4.98 KB
codePieces
1 day ago | 2.44 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!