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