Level 5 : Which of the following is correct output of this program?


a = 1  
while True:  
    if a % 7 = = 0:  
        break  
    print(a)  
    a += 1

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