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