Level 1 : What is the output for the below code?


a = 0

while a < 20:
    a = a+3

print(a)

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