Level 5 : What will be the output of the following code snippet?


count = 0
while(True):
   if count % 3 == 0:
       print(count, end = " ")
   if(count > 15):
       break;
   count += 1

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