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