Level 10 : What will be the output of the following Python code?


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

Author: SandhyaR | Tags: syntax-error | 1736+ Python FAQs | Share
round | raise | expand-tab | return-statement | list-comprehension | memory | mysql | data_structure | type-conversion | python-repl | data-structures | module | staticmethod | higher-order-function | installation | while-else-loop | generators-in-python | enumerate() | max-min | overflow | global-keyword | list-vs-tuple | feature | bitwise | logical-operator | namespace | __init_subclass__ | input-function | polymorphism | indentation | list-slicing | iterable | loops | multiple-inheritance | method | recurssion | tuple | collection | encoding | operator | control-statement | type_conversion | shallow-copy | design-principle | sum-function | built-in-function | decimal | datatype | dicts | string-method | object-attribute | threading | comparison | mutable | python | input | class-and-instance-variable | oops | syntax-error | indexing | methods | function-argument | sys | numpy | slice | exception-handling | assignment-operator | lambda-function | comprehension | objects | invalid-list | functions | python-django | global-variable | lists | tuple-unpacking | data-type | sorted | array | match | print-statement | int | pandas | touples | identifier | complex | frozenset | generators | loop-control | operator-overloading | nested-loop | fabs-function | mathematical-function | call | file_handling | magic-method | zip | inheritance | sys-module | debugging | docstring | python-module | odd-number | operations | pseudocode | statement | version | error-handling | access-modifier | memory-management | numeric | pickling-&-unpickling | precedence-and-associativity | min-max-function | split | counter-function | decorator | syntaxerror | yield | while-loop | interpreter | thread | list-method | functional-programming | string-concatenation | string-manipulation | def | loop | operator-and | constructor | type-conversion | data-type | static-method | list-comprehension | string-slicing | python-history | inherit | zfill-function | factorial-function | command-line-parsing | iterator | list-operation | virtual-environment | init | oop | class | matrix-list-comprehension | regex | round-function | sum() | integer | filter | identity-operator | filter-function | turtle | gil | list-indexing | deep-copy | arithmetic-operation | arithmetic-expression | dictionary | choice | conversion | precedence | string-slicing | head-and-tail | while-and-for-loop | input-function | encapsulation | operator-or | classes | heap-memory | math-copysign | name-mangling | python_version | file | multiprocessing | binary | join | benefit | escape-operator | identity-operator | class-and-inheritance | error | built-in-function | variable | pep | logical-operator | mathematics | string-method | logical-operation | assert | recursion | regular-expression | exception | built-in | print | global | counter | software-design | library | immutable-data-type | lambdas | condition | bitwise-operator | datetime | __future__ | descriptors | compute | id-function | destructor | set | map-function | formal-and-actual-parameter | generator | basic | syntax-error | conditional-statement | postfix | operand | implementation | namedtuple | else-statement | with-statement | rollback | lambda | function | file-handling | dictionaries | complex-number | version-check | append | stack | range | syntax | scientific-notation | binary-operation | swapping | zip-function | operators | asyncio | boolean-and-non-boolean | conditional-statement | exponentiation | copy | matrix | slicing | asyncio-module | min-function | data-structure | context-manager | floating-point-precision | default-mutable-argument | typeerror | mapping-function | comment | random-function | attribute | boolean | import-method | center | list-mutation | exception-handling | multithreading | __all__-attribute | string | goto-function | list | set-operation | keyword | math | sorting | file-handling | async | control-flow | expression | format | control-flow | immutability | class-and-object | update | virtual-environment | parameter | string-formatting | string-iteration | for | data-structure | package-management | random | global-variable | bitwise-operator | function-and-scope | application | string-formatting | collections | list-join | matplotlib ...