Level 1 : What will be the output of the following Python code?


def func(a, b=5, c=10):
    print('a is', a, 'and b is', b, 'and c is', c)
 
func(3, 7)
func(25, c = 24)
func(c = 50, a = 100

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