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