Advertisement
Ilikebugs

Lucas Numbers

Nov 21st, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.11 KB | None | 0 0
  1. def lucas(n):
  2.   if n==0:
  3.     return (2)
  4.   elif n==1:
  5.     return (1)
  6.   else:
  7.     return(lucas(n-1)+lucas(n-2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement