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