Level 9 : What will be the output of the following code?


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

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