Level 1 : what will be the output of the following code snippet


x = 1  
while True:  
    if x % 5 = = 0:  
        break  
    print(x)   
    x + = 1

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