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