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