Level 1 : What is the output of the following code?


print(-18 // 4)

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