Level 9 : What is the output of the followig code?


x=0
while x<20:
    x=x+3
print(x)

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