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