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