Level 1 : Which of the following is the correct output of below program?


i = 1:  
while True:  
    if i%3 == 0:  
        break  
    print(i)

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