Level 10 : How many times will the loop run?


i=2

while(i>0):

    i=i-1

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