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