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


print(-18 // 4)

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