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