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