Level 9 : what is the output of the following code?


dz = 0
while dz < 3: 
      dz += 1
      if dz == 2:
           continue   
      print(dz)

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