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