Level 9 : How many times will the loop run?


i=2

while(i>0):

    i=i-1

Author: SandhyaR | Tags: loop | 1859+ Python FAQs | Share
oop | list-comprehension | raise | walking-through-directories-using-os.walk() | list-method | reading-and-writing-large-files-efficiently | pass | managing-directories-with-os-and-shutil | memory-management | nested-loop | logical-operators | numeric | objects | loop-control-statements | set | operator | interpreter | sets | multiprocessing | string-methods | file_handling | escape-operator | string-formatting | round-function | logical-operation | membership-operators-(in,-not-in) | inheritance | complex | advanced-file-operations | exception-handling | sum-function | append | generator | binary-operation | file-handling | indexing:-loc-vs-iloc | global-variable | expression | key-value-pairs | docstring | string-concatenation | arithmetic-expression | numpy | thread-synchronization | binary | identity-operators-(is,-is-not) | overriding-methods | string | __all__-attribute | comparison | function-and-scope | control-flow | set-operation | recurssion | list-mutation | threading | quantifiers-(*,-+,-?,-{}) | list-vs-tuple | why-use-multiprocessing-over-threading?-(gil) | tuple | filter-function | recursion | boolean-masking | encoding | array | joining-and-merging-dataframes | expand-tab | mathematical-function | comment | for | conditional-statement | choice | indexing | parameter | generators | using-assertions-(assertequal,-assertraises) | max-min | attribute | identity-operator | import-method | name-mangling | data-structure | memory | assignment-operators | operator-and | matrix-list-comprehension | benefit | fabs-function | tuple-methods | operand | functional-programming | print-statement | function | magic-method | destructor | pandas | using-lists-as-stacks | type-conversion-and-casting | with-statement | input-function | regular-expressions | basic | split | anchors-(^,-$) | default-arguments | decorator | zip | multithreading | string-slicing | function-argument | multiple-inheritance | tuples | syntax-error | odd-number | collection | format | error | identity-operator | file | sorting-and-ranking | regular-expression | matrix | introduction-to-python | sum() | handling-missing-values-(fillna,-dropna) | installation | file-handling | frozenset | call | head-and-tail | map-function | dataframe-and-series-objects | logical-operator | assignment-operator | built-in | version-check | working-with-temporary-files-using-tempfile | update | using-map()-for-transformations | string-manipulation | built-in-modules | inherit | class-decorators | virtual-environment | opening-files-(open()) | global-variable | list-join | dictionary-comprehensions | defining-functions | range | python-repl | zip-function | compute | __future__ | touples | zfill-function | formatting-with-strftime | stack | syntax | slice | formal-and-actual-parameter | indentation | while-loop | control-statement | tuple-unpacking | introduction-to-threads | exception-handling | context-manager | booleans | decimal | object-attribute | math-copysign | literal-characters-and-special-characters | library | writing:-write(),-writelines() | boolean-and-non-boolean | variable | error-handling | conversion | rollback | floats | raise-statement | exception | random-function | sorting | working-with-binary-files-(rb,-wb) | loop-control | while-and-for-loop | python-syntax-and-structure | operator-or | identifier | data-structures-in-python | bitwise-operator | default-mutable-argument | filtering-and-indexing | list-methods-and-slicing | global | sys-module | thread-safe-data-structures-(queue.queue) | single-inheritance | parsing-with-strptime | lambda | mapping-function | type_conversion | __init_subclass__ | python-history | mutable | namespace | using-os-and-pathlib-modules | data-type-conversions | module | loops | directory-operations | pep | working-with-file-paths | goto-function | list-slicing | input-function | deep-copy | oops | string-method | feature | gil | immutable-data-type | else-statement | yield | methods | floating-point-precision | collections | functions | data-type | while-loops | creating-and-starting-threads | unit-testing | exponentiation | datetime.date,-datetime.time,-datetime.datetime | loop | list-comprehensions | else | assert | using-else-and-finally | error-handling | pseudocode | string-slicing | statement | lists | type-conversion | implementation | heap-memory | reading:-read(),-readline(),-readlines() | conditional-statement | generators-in-python | datatype | sorted | invalid-list | class | lambdas | int | debugging | string-method | constructor | higher-order-function | keyword | encapsulation | dicts | python-module | bitwise-operator | syntax-error | lambda-functions | bitwise | match | lambda-function | turtle | dictionary-methods | regex | data_structure | operators | min-max-function | introduction-to-multiprocessing | data-types | while-else-loop | design-principle | factorial-function | random | list-operation | polymorphism | center | overflow | precedence | operations | typeerror | functional-programming | string-formatting | iterators | mathematics | global-keyword | scientific-notation | matplotlib | access-modifier | init | python_version | operator-overloading | input | enumerate() | list-indexing | immutability | precedence-and-associativity | asyncio-module | control-flow | condition | using-the-threading-module | thread | def | intering | math | list | shallow-copy | aggregating-data-with-functools.reduce() | multiple-inheritance | swapping | iterable | async | method-overloading | python | postfix | list-comprehension | reading-and-writing-files | static-method | logical-operator | copy | id-function | time-series-with-pandas | integer | staticmethod | class-and-inheritance | working-with-dates-and-times | strings | command-line-parsing | syntaxerror | method | software-design | join | package-management | min-function | list,-set,-and-dictionary-comprehensions | iterator | pickling--unpickling | type-conversion | asyncio | mysql | complex-number | integers | python-operators | return-statement | comprehension | filter | slicing | built-in-function | arbitrary-arguments-(*args,-**kwargs) | counter | classes | test-discovery | class-and-instance-variable | multiple-except-blocks | dictionary | round | data-type | string-iteration | application | using-join()-and-is_alive()-methods | conditional-statements | print | python-django | descriptors | arithmetic-operation | boolean | class-and-object | namedtuple | built-in-function | counter-function | creating-custom-modules | data-structures | sys | difference-between-threads-and-processes | dictionaries | using-yield-in-functions | data-structure | virtual-environment | datetime | version ...