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
Problem: on_off
single_digit
Supermarket prices and stock
GayChicken
epicoaosdsoasd
PyPropertyClass
Cofe
Aufgabe 16
http_request
yyyyy