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