Level 6 : What will be printed when the following code executes?


def test(a, b = 5):
    print(a, b)

test(-3)

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