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