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