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