Level 10 : What is the output of the following code?


def courses(letter):
    switch = { 'a': 'Python', 'b':'java', 'c':'React'}
    return switch.get(letter, "Golang")

courses('aa')

Author: anusha | Tags: function | 1736+ Python FAQs | Share
identity-operator | iterable | statement | string-slicing | python-history | odd-number | async | math-copysign | sum-function | conversion | enumerate() | file | bitwise | iterator | formal-and-actual-parameter | round | yield | indentation | list-indexing | string-slicing | min-max-function | control-flow | exponentiation | operator-or | basic | range | feature | append | class-and-instance-variable | string-manipulation | zip | oop | factorial-function | assert | sys | string-formatting | condition | sorted | global | operators | exception | loops | pep | operator-and | sys-module | oops | global-variable | pseudocode | numpy | print-statement | keyword | input-function | dictionaries | tuple-unpacking | expression | fabs-function | string-method | collections | numeric | round-function | parameter | complex | swapping | identity-operator | module | design-principle | identifier | function-argument | mathematical-function | file-handling | dictionary | escape-operator | input-function | function-and-scope | exception-handling | string-concatenation | deep-copy | virtual-environment | encapsulation | functional-programming | string | built-in | syntax | logical-operator | multithreading | scientific-notation | data_structure | string-iteration | asyncio-module | data-structure | min-function | attribute | filter | else-statement | def | bitwise-operator | gil | operations | lambda-function | comprehension | list-join | arithmetic-operation | call | version | heap-memory | static-method | list-operation | mutable | application | join | syntax-error | class-and-inheritance | choice | interpreter | bitwise-operator | recursion | package-management | type-conversion | generators | pickling-&-unpickling | loop | collection | string-formatting | lambda | zfill-function | tuple | precedence | namedtuple | floating-point-precision | decorator | comment | datatype | counter | math | for | decimal | rollback | classes | generator | multiprocessing | frozenset | copy | stack | slice | max-min | shallow-copy | version-check | list-comprehension | __init_subclass__ | update | conditional-statement | id-function | list | python-repl | boolean-and-non-boolean | command-line-parsing | goto-function | built-in-function | datetime | data-type | zip-function | threading | loop-control | memory | data-structure | descriptors | library | head-and-tail | pandas | class | while-loop | polymorphism | list-method | installation | split | file_handling | objects | format | namespace | python-module | sorting | regular-expression | python-django | magic-method | class-and-object | matrix-list-comprehension | overflow | mapping-function | matrix | immutability | return-statement | dicts | while-else-loop | exception-handling | virtual-environment | typeerror | lists | access-modifier | counter-function | regex | turtle | asyncio | global-variable | while-and-for-loop | with-statement | destructor | mysql | built-in-function | input | import-method | complex-number | type-conversion | function | __all__-attribute | raise | recurssion | set | context-manager | operator | slicing | constructor | python_version | higher-order-function | python | immutable-data-type | method | data-structures | error-handling | operand | center | error | global-keyword | postfix | string-method | type_conversion | thread | encoding | nested-loop | mathematics | list-vs-tuple | precedence-and-associativity | docstring | array | assignment-operator | staticmethod | boolean | multiple-inheritance | control-statement | debugging | implementation | indexing | expand-tab | match | file-handling | inherit | object-attribute | filter-function | touples | conditional-statement | random-function | lambdas | syntax-error | __future__ | arithmetic-expression | list-slicing | list-comprehension | int | binary-operation | operator-overloading | name-mangling | default-mutable-argument | control-flow | functions | matplotlib | print | invalid-list | logical-operation | software-design | integer | init | syntaxerror | set-operation | list-mutation | sum() | benefit | data-type | logical-operator | memory-management | compute | comparison | inheritance | binary | map-function | methods | random | variable | generators-in-python ...