I want print the fibonacci no in one row upto 10 numbers, the next 10 fibonaci nos should be printed in the next line. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I want print the fibonacci no in one row upto 10 numbers, the next 10 fibonaci nos should be printed in the next line.

#program for fibonaci no upto 100 f1=int(0) #initialization f2=int(1) fib=int(0) print("0") for i in range(1,101): #looping upto 100 fib = f1 + f2 f1=f2 f2=fib print(i , fib) #print the fibonaci no

23rd Apr 2020, 2:04 PM
Lavanya T
Lavanya T - avatar
0 Answers