Level 1 : What will be the output of the following code?


i=1
while i < 4:
  print(i, end =' ')
  i++
  print(i+1, end=' ')

Author: KaivalyaG | Tags: operator | 1736+ Python FAQs | Share
invalid-list | python-repl | thread | parameter | python-django | with-statement | global-variable | arithmetic-expression | operator-and | input | descriptors | logical-operator | pseudocode | expression | list-comprehension | method | data-structure | scientific-notation | error | nested-loop | collection | call | classes | input-function | type-conversion | import-method | set-operation | lists | precedence | assert | built-in | list | destructor | generator | loop-control | generators-in-python | sorted | multithreading | class | for | exponentiation | file-handling | multiprocessing | comprehension | function-and-scope | file_handling | min-function | sys | odd-number | heap-memory | name-mangling | append | bitwise-operator | syntax-error | string-concatenation | filter | conversion | module | exception-handling | overflow | expand-tab | match | encapsulation | staticmethod | turtle | higher-order-function | control-statement | command-line-parsing | factorial-function | matrix | goto-function | zip | condition | keyword | python_version | fabs-function | string-manipulation | application | math-copysign | id-function | memory-management | oops | data-type | random | counter-function | shallow-copy | mathematical-function | list-slicing | tuple | __all__-attribute | asyncio | python-history | format | mysql | functions | string-method | numpy | feature | while-else-loop | round | version | deep-copy | choice | object-attribute | decimal | docstring | yield | function | string-iteration | operator-overloading | list-operation | inherit | loop | string-method | string-formatting | input-function | design-principle | round-function | inheritance | global-keyword | typeerror | sum-function | slice | iterable | postfix | boolean-and-non-boolean | debugging | random-function | integer | min-max-function | while-loop | init | objects | sorting | tuple-unpacking | binary-operation | lambdas | else-statement | version-check | boolean | numeric | operator-or | sum() | def | type_conversion | floating-point-precision | variable | package-management | join | built-in-function | list-comprehension | set | immutability | regex | immutable-data-type | exception | comment | benefit | attribute | gil | software-design | range | arithmetic-operation | mapping-function | formal-and-actual-parameter | memory | datetime | string-slicing | rollback | raise | asyncio-module | encoding | collections | oop | list-method | zip-function | implementation | identity-operator | statement | multiple-inheritance | return-statement | iterator | touples | identifier | virtual-environment | list-indexing | datatype | precedence-and-associativity | class-and-object | constructor | interpreter | copy | complex-number | library | threading | matplotlib | comparison | basic | exception-handling | operator | magic-method | print-statement | mathematics | filter-function | control-flow | python | update | namespace | list-join | __init_subclass__ | logical-operator | dictionary | head-and-tail | string-formatting | error-handling | swapping | slicing | dictionaries | center | while-and-for-loop | syntax-error | conditional-statement | syntax | operand | async | functional-programming | string | pep | methods | operators | decorator | bitwise-operator | installation | identity-operator | list-vs-tuple | global | mutable | recursion | __future__ | file | recurssion | counter | pickling-&-unpickling | file-handling | lambda-function | indentation | python-module | conditional-statement | access-modifier | type-conversion | class-and-inheritance | syntaxerror | polymorphism | logical-operation | matrix-list-comprehension | virtual-environment | zfill-function | loops | sys-module | static-method | list-mutation | global-variable | data-structure | context-manager | split | class-and-instance-variable | bitwise | lambda | data-structures | string-slicing | built-in-function | stack | enumerate() | dicts | generators | data_structure | control-flow | complex | namedtuple | pandas | regular-expression | binary | operations | max-min | int | indexing | compute | function-argument | map-function | assignment-operator | array | print | escape-operator | frozenset | default-mutable-argument | data-type | math ...