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