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