Level 1 : What will be the output of the following Python code?


def printMax(a, b):
    if a > b:
        print(a, 'is maximum')
    elif a == b:
        print(a, 'is equal to', b)
    else:
        print(b, 'is maximum')
printMax(3, 4)

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