Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
(P3) Fibonacci 2
x = input() x = int(x) fibo = [1,1] i = 0 while x > fibo[i]: i += 1 y = fibo[i]+fibo[i-1] fibo.append(y) if x == fibo[i] and x > 1 and x < 1836311904: print(x,"=F(",i,")",sep='') elif x == 1: print(x,"=F(0)=F(1)",sep='') elif x > 1836311903: print(x,">F(45)",sep='') else: print("F(",i-1,")<",x,"<F(",i,")",sep='')
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Myone
Pure Python Square root without using Math.sqrt()
Привет
Q3
Python.py
Yogesh.py
ElaineBrown** rextester.com
abstractmethod 2
python lesson 1 function
JV
Please log in to post a comment.