Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Apr 20th, 2019
144
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.15 KB
| None
|
0
0
raw
download
clone
embed
print
report
def fib(x):
if x in [0,1]:
return 1
b1 = 1
b2 = 1
index = 1
while index < x:
b2,b1 = (b2 + b1,b2)
index = index + 1
return b2
print(fib(4))
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
9 hours ago | 1.88 KB
Untitled
9 hours ago | 0.67 KB
Untitled
9 hours ago | 3.33 KB
Untitled
9 hours ago | 1.00 KB
Untitled
9 hours ago | 0.33 KB
Untitled
9 hours ago | 1.55 KB
disable countdown timer in cart for drop pric...
PHP | 17 hours ago | 0.23 KB
bcachefs strange error
19 hours ago | 1.29 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!