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