Computer Science, asked by kumarnirmal447, 4 months ago

write a Python program to generate Fibonacci series till 10 terms using tuple​

Answers

Answered by saran00766
3

def make_fibonacci(n):

fib = []

a, b = 0, 1

for i in range(n):

a, b = b, a+b

fib.append(a)

return tuple(fib)

make_fibonacci(8)

Answered by Rameshjangid
0

Answer:

Fibonacci series can be found by assigning a variable a = 0 and b = 1. We will be printing a and changing the value of a = b and b = a + b.

n = int( input() )

a = 0

b = 1

i = 0

if ( i ! = 1 or i ! = 0 ) :

   while ( i < = n ) :

      print ( a ) ; a = b ; b = a + b ; i ++

else :

      print( a ) ; print ( b ) ;

Why is python better than c

https://brainly.in/question/7706565

Similar Problem

https://brainly.in/question/6607456

#SPJ2

Similar questions