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