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