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


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

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