Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
fibonacci_2
#python 2.7.12 # check if the number of terms is valid def fibo (N): count = 0 n1 = 0 n2 = 1 if N <= 0: print("Input positive integer") elif N == 1: print("Fibonacci seq",N,":") print(n1) else: print("Fibonacci sequence") while count < N: print(n1) nth = n1 + n2 n1 = n2 n2 = nth count = count + 1 fibo(10)
run
|
edit
|
history
|
help
0
my first code
0aa6d60d0504c8470fc90c1d5cbf06083cdaadeab6e102bf90732ac2ab66dfdc
Glimpse Of Numpy Python
Temperature Converter
GayChicken
on_off_3
Looking at the /etc folder... :)
No of Minutes in 7 weeks
bacs_class
Difference of Sum