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