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