Level 10 : Choose the correct option for the below code?


a = 1
while True:
    if a % 7 == 0:
        break
    print(a)
    a += 1

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