Level 1 : What is the output of the below Python program?


a,b,c,n = 0,1,0,10
c = a+b
n = n-2
while n>0:
    print(c, end=" ")
    a = b
     b = c
     c = a+b
     n = n-1

Author: KaivalyaG | Tags: loop | 1736+ Python FAQs | Share
goto-function | async | decorator | statement | matplotlib | thread | while-else-loop | while-and-for-loop | sorted | encapsulation | generator | while-loop | feature | exponentiation | magic-method | file-handling | zip | __all__-attribute | bitwise-operator | lists | functional-programming | else-statement | module | sys | installation | oop | syntax-error | loops | string-concatenation | choice | assert | data-type | control-flow | python-repl | boolean-and-non-boolean | formal-and-actual-parameter | min-max-function | inherit | data-type | control-statement | swapping | expand-tab | function-argument | function | string-method | dictionary | assignment-operator | bitwise | logical-operator | pep | mutable | threading | mathematics | exception-handling | multiple-inheritance | collection | global-variable | string-method | iterator | collections | zfill-function | operator | comment | file-handling | __future__ | numeric | fabs-function | condition | python-django | objects | slicing | string-slicing | conditional-statement | package-management | invalid-list | min-function | identifier | numpy | software-design | input-function | list-comprehension | interpreter | basic | class | nested-loop | tuple | deep-copy | version | id-function | stack | rollback | scientific-notation | loop | typeerror | lambda | list-comprehension | type_conversion | immutable-data-type | conditional-statement | descriptors | variable | range | append | type-conversion | list-mutation | operand | arithmetic-operation | library | call | memory | loop-control | data-structure | turtle | version-check | constructor | for | print-statement | list-indexing | default-mutable-argument | datatype | lambda-function | decimal | python-module | list-vs-tuple | pandas | escape-operator | generators-in-python | asyncio | file | set | immutability | return-statement | identity-operator | datetime | docstring | operator-or | conversion | precedence | string-formatting | zip-function | function-and-scope | heap-memory | enumerate() | gil | classes | counter-function | recursion | mathematical-function | iterable | expression | list-slicing | methods | compute | encoding | memory-management | name-mangling | postfix | random | multiprocessing | regex | binary | keyword | exception | filter | string-slicing | overflow | def | debugging | data-structure | global-variable | parameter | mapping-function | indexing | logical-operator | list-operation | precedence-and-associativity | filter-function | touples | file_handling | operations | design-principle | indentation | center | frozenset | odd-number | round | math | matrix-list-comprehension | bitwise-operator | set-operation | split | implementation | command-line-parsing | context-manager | sum-function | floating-point-precision | factorial-function | syntaxerror | namedtuple | built-in-function | map-function | class-and-inheritance | class-and-object | sys-module | method | python-history | dictionaries | control-flow | oops | class-and-instance-variable | copy | update | comprehension | static-method | sum() | integer | built-in-function | built-in | int | functions | virtual-environment | python | with-statement | virtual-environment | list | global-keyword | shallow-copy | pickling-&-unpickling | input-function | math-copysign | staticmethod | operator-and | asyncio-module | application | __init_subclass__ | generators | max-min | head-and-tail | python_version | multithreading | counter | destructor | polymorphism | binary-operation | identity-operator | raise | operators | join | syntax-error | recurssion | list-method | input | slice | arithmetic-expression | matrix | string-iteration | init | error-handling | format | logical-operation | global | string | string-manipulation | match | round-function | tuple-unpacking | import-method | attribute | object-attribute | sorting | higher-order-function | data-structures | print | data_structure | access-modifier | boolean | syntax | yield | mysql | exception-handling | complex | complex-number | inheritance | benefit | array | regular-expression | namespace | lambdas | string-formatting | pseudocode | dicts | error | type-conversion | operator-overloading | comparison | random-function | list-join ...