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