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