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