المدة الزمنية 4:41

Write python that create a tuple storing first 9 term of Fibonacci series.

بواسطة Portal Express
962 مشاهدة
0
21
تم نشره في 2020/04/12

Q. Write python that create a tuple storing first 9 term of Fibonacci series . Website Link :- https://www.pathwalla.com/2020/03/q-8-type-c-python-revision-tour-2.html Q 8 || Type C || Python revision tour 2 || Sumita Arora || Class 12 || Computer science || IP Python revision tour 2 Playlist link --- /playlist/PL2fNQnSKhEornwFh8U_gYSc5diW7gMyii&playnext=1&index=1 Answer :- fib = (0,1,1) for i in range(6): fib = fib + ( fib [ i +1] + fib [ i + 2 ] ,) print(fib) Output :- (0, 1, 1, 2, 3, 5, 8, 13, 21)

الفئة

عرض المزيد

تعليقات - 0