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