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