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