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


dz = 1
while dz < 3: 
  	print(dz)
        dz += 1

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