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