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