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