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