Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Lucas Number Recursive Function
eeperry
Feb 8th, 2013
294
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
MIDI setup
6 hours ago | 0.20 KB
Sniffed from funkemunky report
13 hours ago | 67.47 KB
fe7 rando settings for importing (requires yu...
14 hours ago | 2.54 KB
LOGs
16 hours ago | 0.50 KB
Untitled
1 day ago | 14.12 KB
Untitled
1 day ago | 11.86 KB
Untitled
C | 1 day ago | 8.97 KB
Untitled
Python | 2 days ago | 8.34 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!